diff options
2 files changed, 8 insertions, 5 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java index 9d594444c..9ebd25fbd 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java @@ -202,10 +202,11 @@ public class PotentialLiftExpression extends PotentialTranslationExpression { private MessageSend genLiftCall(BlockScope scope, TypeBinding providedType) { MessageSend liftCall = Lifting.liftCall(scope, this.teamExpr, this.expression, providedType, this.expectedType, this.requireReverseOperation); liftCall.actualReceiverType = this.teamExpr.resolveType(scope); - liftCall.binding = ((ReferenceBinding)this.teamExpr.resolvedType).getMethod(scope, liftCall.selector); + if (this.teamExpr.resolvedType instanceof ReferenceBinding) // i.e. not-null + liftCall.binding = ((ReferenceBinding)this.teamExpr.resolvedType).getMethod(scope, liftCall.selector); if (liftCall.binding == null) // can't process (analyze,generate) if lift method is missing { - if (TeamModel.hasRoFiCache((ReferenceBinding)liftCall.actualReceiverType)) + if (liftCall.actualReceiverType != null && TeamModel.hasRoFiCache((ReferenceBinding)liftCall.actualReceiverType)) scope.problemReporter().unresolvedLifting(this, providedType, this.expectedType); else scope.problemReporter().referenceContext.tagAsHavingErrors(); 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 6de35d5c8..1dd7b4b1c 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 @@ -532,9 +532,11 @@ public class CallinImplementorDyn extends MethodMappingImplementor { gen.typeReference(baseArgType), callinDecl.scope), CastExpression.DO_WRAP); - // lift?(MyBaseClass) - arg = gen.potentialLift(gen.thisReference(), arg, roleParam, isReplace/*reversible*/); - canLiftingFail |= checkLiftingProblem(teamDecl, callinDecl, (ReferenceBinding)roleParam.leafComponentType()); + if (!roleParam.leafComponentType().isBaseType()) { + // lift?(MyBaseClass) + arg = gen.potentialLift(gen.thisReference(), arg, roleParam, isReplace/*reversible*/); + canLiftingFail |= checkLiftingProblem(teamDecl, callinDecl, (ReferenceBinding)roleParam.leafComponentType()); + } } } else { arg = getArgument(callinDecl, // prepare: <mappedArg<n>> |