Bug 436759 [otdre] Finish implementation of OTDRE
- fix TeamNesting.test1122_layerdTeams9
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 cdbb466..13506b3 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
@@ -308,7 +308,10 @@
// we probably want to avoid generating empty methods here.
final TypeDeclaration teamDecl = aTeam.getAst();
if (teamDecl == null) return;
+
final AstGenerator gen = new AstGenerator(teamDecl);
+ gen.replaceableEnclosingClass = teamDecl.binding;
+
// public void _OT$callBefore (IBoundBase2 base, int boundMethodId, int callinId, Object[] args)
// public void _OT$callAfter (IBoundBase2 base, int boundMethodId, int callinId, Object[] args, Object result)
@@ -387,7 +390,6 @@
boolean isStaticRoleMethod = callinDecl.getRoleMethod().isStatic();
ReferenceBinding roleType = callinDecl.scope.enclosingReceiverType();
MethodBinding roleMethodBinding = callinDecl.getRoleMethod();
-
boolean needLiftedRoleVar = !isStaticRoleMethod
&& roleType.isCompatibleWith(roleMethodBinding.declaringClass);