We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider the following:
trait T { static m() { 'T' } } class C implements T { } print C.m() print T.m()
Should print "T" when compiled and executed followed by MissingMethodException. Also, Java sources should behave as follows:
public class J { static void main(String[] args) { System.out.print(C.m()); // should output "T" System.out.print(T.m()); // should not be found } }
The text was updated successfully, but these errors were encountered:
All occurrences of "T.m()" should infer as unknown. Traits do not have default or static methods at run-time; they belong to the implementing class.
Sorry, something went wrong.
Fix for #1152: static methods are not directly available for trait types
e459ceb
Fix for #1152: make static trait methods private in JDT model (Java 9+)
8b325ab
- copy them (without private modifier) to implementing class(es)
cdf2976
eric-milles
No branches or pull requests
Consider the following:
Should print "T" when compiled and executed followed by MissingMethodException. Also, Java sources should behave as follows:
The text was updated successfully, but these errors were encountered: