Community
Participate
Working Groups
From commit 519d650af9092ca64ac5162b38afd9cc8962b11d 15 FormatterRegressionTests are failing..cause being an extra line addition -All the failures are in testBug370540.. series.
(In reply to Manoj Palat from comment #1) > From commit 519d650af9092ca64ac5162b38afd9cc8962b11d 15 > FormatterRegressionTests are failing..cause being an extra line addition > -All the failures are in testBug370540.. series. Interesting, when I rollback the merged commits, I see the tests passing. But just comparing the individual that were part of that commit or even the entire formatter source folder with master doesn't produce any differences.
public class Example { java.util.function.BiConsumer<Example, String> lambda = (Example example, String text) -> { }; } The root cause is that given the code above, the ASTParser returns an AST root with the following problem: Pb(231) Syntax error on token "=", ( expected after this token Instead of a single field declaration, the returned type declarations has three items: - FieldDeclaration: java.util.function.BiConsumer<Example,String> lambda; - FieldDeclaration: Example example, String; - Initializer: {}
Thanks for the example Mateusz. I can confirm that the recent merge has nothing to do with this. I also confirmed that the parser generated files are in sync with the grammar file. Interesting observation I made is the error happens only when one of the lambda argument has a name 'example'! What could cause this? I have no clue at this point.
(In reply to Jay Arthanareeswaran from comment #4) > What could cause this? I have no clue at this point. Now I do. There's an NPE caused here: Scanner$VanguardParser(Parser).isParsingModuleDeclaration() line: 13001 Scanner$VanguardScanner(Scanner).isInModuleDeclaration() line: 2534 Scanner$VanguardScanner(Scanner).internalScanIdentifierOrKeyword(int, int, char[]) line: 3123 Looks like we should expect null compilation units in the parser. I will release a fix.
Released the fix here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA9&id=88990523833d1a48a3fb93f8126737360efa4666 Sasi, let me know if you are fine with this fix.