KT-1054 comparison of booleans

This commit is contained in:
Alex Tkachman
2012-01-18 18:10:41 +01:00
parent 01b405c86a
commit a529ad2ac7
3 changed files with 22 additions and 1 deletions
@@ -1690,7 +1690,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
}
public StackValue generateEqualsForExpressionsOnStack(IElementType opToken, Type leftType, Type rightType, boolean leftNullable, boolean rightNullable) {
if (isNumberPrimitive(leftType) && leftType == rightType) {
if ((isNumberPrimitive(leftType) || leftType.getSort() == Type.BOOLEAN) && leftType == rightType) {
return compareExpressionsOnStack(opToken, leftType);
}
else {