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
<enum>::values() can not be resolved without the enum name #4416
Comments
The tests have failures. A push request with optimized tests and a fix is incoming. |
Could you be more specific? |
Hi @jlerbsc, yes, I can. The upper code fragment will never work, because method public class ClassTest {
public enum SecurityPolicyScopedTemplatesKeys {
SUSPICIOUS(\"suspicious\");
private String displayName;
private SecurityPolicyScopedTemplatesKeys(String displayName) {
this.displayName = displayName;
}
public String getDisplayName() {
return this.displayName;
}
}
public SecurityPolicyScopedTemplatesKeys m(int id) {
return values()[id];
}
} There is still an issue with the resolution of the implicit method The remaining issue throws an exception, if I try to Best regards Kim |
Hi,
I have a problem with resolving the implicit method "values()" of an enum. Resolving is only possible, if the enum is given as the scope.
Example (does not work):
Example (does work):
I used EnumResolutionTest#testResolveValueOfMethod as a template for the example test.
Tested with 73d9c4f.
Best regards
Kim
The text was updated successfully, but these errors were encountered: