Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xtend: Strange error message for void as a field type #2877

Closed
LorenzoBettini opened this issue Dec 20, 2023 · 1 comment · Fixed by #2879
Closed

Xtend: Strange error message for void as a field type #2877

LorenzoBettini opened this issue Dec 20, 2023 · 1 comment · Fixed by #2879
Assignees

Comments

@LorenzoBettini
Copy link
Contributor

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...

@szarnekow

@szarnekow
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants