Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2013-01-06 22:54:24 +0000
committerStephan Herrmann2013-01-22 20:51:53 +0000
commit27f3487cac9616f3cda7e7d6e3d091b84f562a1b (patch)
tree1a4313af3a613dc1cf246f02d601c4f8316ee381
parent605b6e6bd65dcc4e390ba2831833e4e10c1a6a80 (diff)
downloadorg.eclipse.objectteams-27f3487cac9616f3cda7e7d6e3d091b84f562a1b.tar.gz
org.eclipse.objectteams-27f3487cac9616f3cda7e7d6e3d091b84f562a1b.tar.xz
org.eclipse.objectteams-27f3487cac9616f3cda7e7d6e3d091b84f562a1b.zip
Bug 397192 - Prepare OTDT for new (dynamic) weaver:
Use the correct 'result' variable as arg to a predicate check. Status: 2184/2/133
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java4
1 files changed, 2 insertions, 2 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 d9bfa8cb6..2227e79f2 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
@@ -405,7 +405,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
// do we need to expose _OT$result as result?
if (callinDecl.callinModifier == TerminalTokens.TokenNameafter
- && callinDecl.mappings != null
+ && (callinDecl.mappings != null || callinDecl.predicate != null)
&& baseReturn != TypeBinding.VOID)
blockStatements.add(gen.localVariable(RESULT, baseReturn, // BaseReturnType result = (BaseReturnType)_OT$result;
gen.createCastOrUnboxing(gen.singleNameReference(_OT_RESULT), baseReturn, true/*baseAccess*/)));
@@ -578,7 +578,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
continue;
// -- role side predicate:
- Expression[] predicateArgs = maybeAddResultReference(callinDecl, callArgs, _OT_RESULT, gen);
+ Expression[] predicateArgs = maybeAddResultReference(callinDecl, callArgs, RESULT, gen);
Statement rolePredicateCheck = predGen.createPredicateCheck( // if (!when(callArgs)) throw new LiftingVetoException();
callinDecl,
callinDecl.scope.referenceType(),

Back to the top