fix for KT-299

This commit is contained in:
Alex Tkachman
2011-09-12 18:01:39 +03:00
parent 4071d67c41
commit b7542ecc4e
3 changed files with 23 additions and 2 deletions
@@ -1196,10 +1196,10 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
getInIntRange(leftValue, rangeExpression, inverted);
}
else {
leftValue.put(JetTypeMapper.TYPE_OBJECT, v);
FunctionDescriptor op = (FunctionDescriptor) bindingContext.get(BindingContext.REFERENCE_TARGET, expression.getOperationReference());
leftValue.put(typeMapper.mapType(op.getValueParameters().get(0).getOutType()), v);
genToJVMStack(expression.getRight());
v.swap();
FunctionDescriptor op = (FunctionDescriptor) bindingContext.get(BindingContext.REFERENCE_TARGET, expression.getOperationReference());
invokeFunctionNoParams(op, Type.BOOLEAN_TYPE, v);
}
return StackValue.onStack(Type.BOOLEAN_TYPE);