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
java8: Create compilable test inputs with all possible cases for method references #2968
Comments
@rnveach , can you help us with it ? |
looking over this file as a guide while doing my search: https://github.com/sabaka/checkstyle/blob/e3964e7a8531c5660b630a4bbc41066acfb2cd96/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputMethodReferences4.java I have examples of
Eclipse gives me |
@rnveach , I didn't try to compile examples from this file. I only wrote them according to grammar. |
@sabaka Yes, what I was talking about was me playing with the same formats in the compiler. Here are my current examples that compile in Eclipse: https://github.com/rnveach/checkstyle/blob/b7c8f04e6d96492f95b5e411d760e5d58956e46f/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputMethodReferences4.java#L41 |
just a reminder: to recheck "javac" compilation of code. Eclipse has its own java compiler, mismatch on conner/complicated cases could happen. We need to support code that compilable by javac. |
@rnveach , did you finish this issue ? do you have problems with smth? do you need help ? |
Sorry for the delay. Travis did not accept This means it won't also accept |
It means, that jls has ambigous grammar and it's good for us - we have to On Mon, Mar 21, 2016 at 11:46 PM rnveach notifications@github.com wrote:
|
@rnveach , if that is possible in JDK grammar, most likely that is non developed feature yet, or .... My recommendation is to keep such cases as commented if that is possible by JDK grammar but not by javac for now. It might be reasonable to try openjdk9 javac to compile that stuff. If it is not referenced in grammar of JDK specification - just remove it. |
It may be more something we are missing from the JLS. I think this is close to the section in question for the ones we are failing to compile: Even though we are not working with arrays, the key area is
I think Maybe @sabaka can confirm? |
@romani PR was merged, questions have gone unanswered. Is there anything more we have to do here? |
@rnveach , lets check this on openjdk9 , if such cases are not compilable by javac we could skip support of them and close the issue. |
All compilable sources that we don't support from openjdk9 were identified in #3033 and have issues created to add their support. The failures were annotation locations, not method references. |
@rnveach, Just launch javac of java9 on examples that you are mentioned as possible. If not compilable - close the issue. |
We need set of inputs to test our grammar changes for method references. They should cover all possible cases of using method references.
All inputs should be compilable with java 8.
You may find this link helpful: https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-MethodReference
You should "extract" grammar rules to possible cases in code.
According to this specification, method reference are referenced only from primary expression https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-PrimaryNoNewArray
It should help you to put method reference in right places
some initial commit: sabaka@45b0deb
The text was updated successfully, but these errors were encountered: