Xtend: Strange error message for `void` as a field type
LorenzoBettini opened this issue · comments
Lorenzo Bettini commented
When you use void
for an Xtend field the error message is
Primitive void cannot be a dependency.
Coming from XtendValidator
@Check
public void checkNoVoidInDependencyDeclaration(XtendField dep) {
JvmTypeReference declaredFieldType = dep.getType();
if (isPrimitiveVoid(declaredFieldType)) {
error("Primitive void cannot be a dependency.", dep.getType(), null, INVALID_USE_OF_TYPE);
}
}
Why not something similar to parameters' corresponding error message void is an invalid type for the field...
Sebastian Zarnekow commented
You're right, this is very poor feedback and dates back to one of the first versions of Xtend. Please make the necessary adjustments to improve the message.