Skip to content

Commit

Permalink
Xtend: fixed strange error message for void as a field type
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Jan 1, 2024
1 parent cc49ec9 commit da2e5b8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit da2e5b8

Please sign in to comment.