Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2013-01-01 19:17:08 +0000
committerStephan Herrmann2013-01-22 20:47:12 +0000
commit7fbb8f7a2dd267ce2e988aed25ff156cf30c1430 (patch)
tree71487264bb1d87e987112fd8694b56e03ffc2f81
parent252e3f87515c0aaa33072cc48fec9dc2d0a3ebc9 (diff)
downloadorg.eclipse.objectteams-7fbb8f7a2dd267ce2e988aed25ff156cf30c1430.tar.gz
org.eclipse.objectteams-7fbb8f7a2dd267ce2e988aed25ff156cf30c1430.tar.xz
org.eclipse.objectteams-7fbb8f7a2dd267ce2e988aed25ff156cf30c1430.zip
Bug 397192 - Prepare OTDT for new (dynamic) weaver:
Fixed test1122_layeredTeams1
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java5
1 files changed, 5 insertions, 0 deletions
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 398d2b5f5..711ba5b3f 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
@@ -59,6 +59,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.OTDynCallinB
import org.eclipse.objectteams.otdt.internal.core.compiler.lifting.Lifting;
import org.eclipse.objectteams.otdt.internal.core.compiler.lifting.Lowering;
import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.CallinCalloutBinding;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
import org.eclipse.objectteams.otdt.internal.core.compiler.model.MethodModel;
import org.eclipse.objectteams.otdt.internal.core.compiler.model.RoleModel;
@@ -69,6 +70,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transfor
import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer.ReplaceResultReferenceVisitor;
import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstEdit;
import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
+import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator;
/**
* This class translates callin binding to the dynamic weaving strategy.
@@ -520,6 +522,9 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
CastExpression.RAW);
} else {
// Object -> MyBaseClass
+ ReferenceBinding baseclass = roleType.baseclass();
+ if (baseclass instanceof DependentTypeBinding && baseArgType instanceof ReferenceBinding)
+ baseArgType = RoleTypeCreator.maybeInstantiateFromPlayedBy(callinDecl.scope, (ReferenceBinding)baseArgType);
arg = gen.castExpression(arg,
gen.alienScopeTypeReference(
gen.typeReference(baseArgType),

Back to the top