From c4576116970108757e671da55addb059ddce3743 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 20 Dec 2023 13:46:32 +0100 Subject: [PATCH] Xtend: fixed strange error message for `void` as a field type --- .../org/eclipse/xtend/core/validation/XtendValidator.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org.eclipse.xtend.core/src/org/eclipse/xtend/core/validation/XtendValidator.java b/org.eclipse.xtend.core/src/org/eclipse/xtend/core/validation/XtendValidator.java index 45e8708839e..59fd919da9b 100644 --- a/org.eclipse.xtend.core/src/org/eclipse/xtend/core/validation/XtendValidator.java +++ b/org.eclipse.xtend.core/src/org/eclipse/xtend/core/validation/XtendValidator.java @@ -500,10 +500,11 @@ protected EObject getContainingAnnotationTarget(XAnnotation annotation) { } @Check - public void checkNoVoidInDependencyDeclaration(XtendField dep) { - JvmTypeReference declaredFieldType = dep.getType(); + public void checkXtendFieldNotPrimitiveVoid(XtendField field) { + JvmTypeReference declaredFieldType = field.getType(); if (isPrimitiveVoid(declaredFieldType)) { - error("Primitive void cannot be a dependency.", dep.getType(), null, INVALID_USE_OF_TYPE); + error("void is an invalid type for the field " + field.getName(), + field.getType(), null, INVALID_USE_OF_TYPE); } }