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

Java: Array.getPackage() (and Array.getQualifiedName()) cannot be used #7067

Open
Marcono1234 opened this issue Nov 6, 2021 · 0 comments
Open
Labels

Comments

@Marcono1234
Copy link
Contributor

@Marcono1234 Marcono1234 commented Nov 6, 2021

Trying to use Array.getPackage() or any predicate depending on it, such as Array.getQualifiedName(), causes a compilation error:

Expr::ExprParent incompatible with Type::Array in context

The underlying problem seems to be that RefType.getPackage() only considers classes and interfaces, but not arrays. Maybe for arrays it should be compilable but simply have no result (should be documented in getPackage() and getQualifiedName() for RefType and Array then; maybe for other predicates as well)?

Relates to #5320

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

Successfully merging a pull request may close this issue.

None yet
1 participant