One more tweak to restore callin-rhs completion
+ adjust expectation for pseudo-random syntax errors
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
index c77e9b2..1284f6f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
@@ -2212,8 +2212,6 @@
protected boolean needBindoutDisambiguation() {
if (!this._isOTSource)
return false;
- if (this._calloutSeen || this._callinSeen)
- return false; // no nesting
if (this.activeParser instanceof VanguardParser) {
Goal goal = ((VanguardParser)this.activeParser).currentGoal;
return !(goal == Goal.LambdaParameterListGoal || goal == Goal.PatternGoal || goal == Goal.SwitchLabelCaseLhsGoal);
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
index daa5392..5efd0c9 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
@@ -344,64 +344,70 @@
"}\n" +
" \n"
},
- "----------\n" +
- "1. ERROR in Team321ciwmp6.java (at line 1)\n" +
- " \n" +
- "public team class Team321ciwmp6 {\n" +
- " ^\n" +
- "Syntax error on token \"++\", || expected before this token\n" +
- "----------\n" +
- "2. ERROR in Team321ciwmp6.java (at line 1)\n" +
- " \n" +
- "public team class Team321ciwmp6 {\n" +
- " ^\n" +
- "Syntax error on token \";\", ++ expected before this token\n" +
- "----------\n" +
- "3. ERROR in Team321ciwmp6.java (at line 5)\n" +
- " int doSomethingOther(int r1) -> int doSomething(int b1) wrong\n" +
- " ^^^^^\n" +
- "Syntax error on token \"wrong\", delete this token\n" +
- "----------\n" +
- "4. ERROR in Team321ciwmp6.java (at line 9)\n" +
- " };\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "5. ERROR in Team321ciwmp6.java (at line 9)\n" +
- " };\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "6. ERROR in Team321ciwmp6.java (at line 11)\n" +
- " int doCalloutGetSomeFieldDoubled() -> get int someField\n" +
- " ^\n" +
- "Syntax error, insert \")\" to complete MethodDeclaration\n" +
- "----------\n" +
- "7. ERROR in Team321ciwmp6.java (at line 11)\n" +
- " int doCalloutGetSomeFieldDoubled() -> get int someField\n" +
- " ^\n" +
- "Syntax error, insert \";\" to complete MethodDeclaration\n" +
- "----------\n" +
- "8. ERROR in Team321ciwmp6.java (at line 13)\n" +
- " result <- 2 * base.someField\n" +
- " ^^^^^^\n" +
- "No method result found in type Team321ciwmp6.Role to resolve method designator (OTJLD 4.1(c)).\n" +
- "----------\n" +
- "9. ERROR in Team321ciwmp6.java (at line 13)\n" +
- " result <- 2 * base.someField\n" +
- " ^\n" +
- "Syntax error on token \".\", delete this token\n" +
- "----------\n" +
- "10. ERROR in Team321ciwmp6.java (at line 13)\n" +
- " result <- 2 * base.someField\n" +
- " ^\n" +
- "Syntax error, insert \":: IdentifierOrNew\" to complete Expression\n" +
- "----------\n" +
- "11. ERROR in Team321ciwmp6.java (at line 13)\n" +
- " result <- 2 * base.someField\n" +
- " ^^^^^^^^^\n" +
- "No method someField found in type T321ciwmp6 to resolve method designator (OTJLD 4.1(c)).\n" +
- "----------\n"
+ "----------\n" +
+ "1. ERROR in Team321ciwmp6.java (at line 1)\n" +
+ " \n" +
+ "public team class Team321ciwmp6 {\n" +
+ " ^\n" +
+ "Syntax error on token \";\", ++ expected before this token\n" +
+ "----------\n" +
+ "2. ERROR in Team321ciwmp6.java (at line 5)\n" +
+ " int doSomethingOther(int r1) -> int doSomething(int b1) wrong\n" +
+ " ^^^^^\n" +
+ "Syntax error on token \"wrong\", delete this token\n" +
+ "----------\n" +
+ "3. ERROR in Team321ciwmp6.java (at line 9)\n" +
+ " };\n" +
+ " ^\n" +
+ "Syntax error, insert \"}\" to complete ClassBody\n" +
+ "----------\n" +
+ "4. ERROR in Team321ciwmp6.java (at line 9)\n" +
+ " };\n" +
+ " ^\n" +
+ "Syntax error, insert \"}\" to complete ClassBody\n" +
+ "----------\n" +
+ "5. ERROR in Team321ciwmp6.java (at line 11)\n" +
+ " int doCalloutGetSomeFieldDoubled() -> get int someField\n" +
+ " ^^^\n" +
+ "Syntax error on token \"int\", record expected\n" +
+ "----------\n" +
+ "6. ERROR in Team321ciwmp6.java (at line 11)\n" +
+ " int doCalloutGetSomeFieldDoubled() -> get int someField\n" +
+ " with {\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Syntax error on tokens, delete these tokens\n" +
+ "----------\n" +
+ "7. ERROR in Team321ciwmp6.java (at line 12)\n" +
+ " with {\n" +
+ " result <- 2 * base.someField\n" +
+ " ^\n" +
+ "Syntax error on token \";\", & expected before this token\n" +
+ "----------\n" +
+ "8. ERROR in Team321ciwmp6.java (at line 13)\n" +
+ " result <- 2 * base.someField\n" +
+ " ^^^^^^^^^^^^^\n" +
+ "Syntax error on tokens, delete these tokens\n" +
+ "----------\n" +
+ "9. ERROR in Team321ciwmp6.java (at line 13)\n" +
+ " result <- 2 * base.someField\n" +
+ " ^^^^^\n" +
+ "Syntax error on tokens, delete these tokens\n" +
+ "----------\n" +
+ "10. ERROR in Team321ciwmp6.java (at line 13)\n" +
+ " result <- 2 * base.someField\n" +
+ " ^\n" +
+ "Syntax error, insert \"enum Identifier\" to complete EnumHeaderName\n" +
+ "----------\n" +
+ "11. ERROR in Team321ciwmp6.java (at line 13)\n" +
+ " result <- 2 * base.someField\n" +
+ " ^\n" +
+ "Syntax error, insert \"EnumBody\" to complete ClassBodyDeclarations\n" +
+ "----------\n" +
+ "12. ERROR in Team321ciwmp6.java (at line 14)\n" +
+ " };\n" +
+ " ^\n" +
+ "Syntax error on token \"}\", { expected\n" +
+ "----------\n"
);
}