Fix for KT-11584: Regression in 1.0.1: incorrect comparison of Long! with integer constant

#KT-11584 Fixed
This commit is contained in:
Michael Bogdanov
2016-03-23 17:23:00 +01:00
parent 628f9050fb
commit a851bb0fff
3 changed files with 20 additions and 1 deletions
@@ -3138,7 +3138,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
Type leftType = expressionType(left);
Type rightType = expressionType(right);
Callable callable = resolveToCallable((FunctionDescriptor) resolvedCall.getResultingDescriptor(), false, resolvedCall);
if (callable instanceof IntrinsicCallable) {
if (isPrimitive(leftType) && isPrimitive(rightType) && callable instanceof IntrinsicCallable) {
type = comparisonOperandType(leftType, rightType);
leftValue = gen(left);
rightValue = gen(right);