Fix regression in Java5.testA17_genericBaseclass3(),
- raw role type in _OT$callBefore caused inference failure
Also improve check to run the compiled program (J8-BCEL incompat.)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
index 2f850d5..cdbb466 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
@@ -432,7 +432,8 @@
canLiftingFail |= checkLiftingProblem(teamDecl, callinDecl, roleType);
roleVar = (LOCAL_ROLE+statements.size()).toCharArray();
- blockStatements.add(gen.localVariable(roleVar, roleType.sourceName(), // RoleType local$n = this._OT$liftToRoleType((BaseType)base);
+ blockStatements.add(gen.localVariable(roleVar, // RoleType local$n = this._OT$liftToRoleType((BaseType)base);
+ gen.alienScopeTypeReference(gen.typeReference(roleType), callinDecl.scope),
Lifting.liftCall(callMethod.scope,
gen.thisReference(),
gen.castExpression(gen.baseNameReference(IOTConstants.BASE),
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
index 556d2a8..de3310a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
@@ -1460,6 +1460,7 @@
throw new InternalCompilerError("Unexpected type reference: "+original); //$NON-NLS-1$
}
result.setBaseclassDecapsulation(DecapsulationState.REPORTED);
+ result.bits |= ASTNode.IgnoreRawTypeCheck;
return result;
}
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
index 04c2246..423b859 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
@@ -4053,7 +4053,7 @@
" void test() throws NoSuchMethodException {\n" +
" new R().test();\n" +
" }\n" +
- (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+ (this.weavingScheme == WeavingScheme.OTRE && IS_JRE_8
? "" // skip execution
:
" public static void main(String[] args) throws NoSuchMethodException {\n" +
@@ -4096,7 +4096,7 @@
"}\n" +
" \n"
},
- (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+ (this.weavingScheme == WeavingScheme.OTRE && IS_JRE_8
? ""
: "@IA117cfa5e(val1=TWO, val2=C)@org.objectteams.ImplicitTeamActivation()Active"));
}