From abb106c885976f082d7004242eeea5157424f0e6 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Thu, 25 Aug 2016 08:55:27 +0300 Subject: [PATCH] Fix operator markup for '!==' and '!in'. --- .../kotlin/psi2ir/generators/OperatorExpressionGenerator.kt | 4 ++-- compiler/testData/ir/irText/identity.txt | 2 +- compiler/testData/ir/irText/in.txt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/OperatorExpressionGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/OperatorExpressionGenerator.kt index a7d0962790c..bbc382e2a47 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/OperatorExpressionGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/OperatorExpressionGenerator.kt @@ -150,7 +150,7 @@ class OperatorExpressionGenerator( IrOperator.IN -> irContainsCall IrOperator.NOT_IN -> - IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrOperator.EXCL, context.irBuiltIns.booleanNot, + IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrOperator.NOT_IN, context.irBuiltIns.booleanNot, irContainsCall) else -> throw AssertionError("Unexpected in-operator $irOperator") @@ -170,7 +170,7 @@ class OperatorExpressionGenerator( IrOperator.EQEQEQ -> irIdentityEquals IrOperator.EXCLEQEQ -> - IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrOperator.EXCL, context.irBuiltIns.booleanNot, + IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrOperator.EXCLEQEQ, context.irBuiltIns.booleanNot, irIdentityEquals) else -> throw AssertionError("Unexpected identity operator $irOperator") diff --git a/compiler/testData/ir/irText/identity.txt b/compiler/testData/ir/irText/identity.txt index f7ceb9f655c..022828aeb81 100644 --- a/compiler/testData/ir/irText/identity.txt +++ b/compiler/testData/ir/irText/identity.txt @@ -10,7 +10,7 @@ IrFile /identity.kt IrExpressionBody BLOCK type= hasResult=false operator=null RETURN type= - CALL .NOT type=kotlin.Boolean operator=EXCL + CALL .NOT type=kotlin.Boolean operator=EXCLEQEQ arg0: CALL .EQEQEQ type=kotlin.Boolean operator=EXCLEQEQ arg0: GET_VAR a type=kotlin.Int operator=null arg1: GET_VAR b type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/in.txt b/compiler/testData/ir/irText/in.txt index f73fe6fba8a..877f6743c73 100644 --- a/compiler/testData/ir/irText/in.txt +++ b/compiler/testData/ir/irText/in.txt @@ -10,7 +10,7 @@ IrFile /in.kt IrExpressionBody BLOCK type= hasResult=false operator=null RETURN type= - CALL .NOT type=kotlin.Boolean operator=EXCL + CALL .NOT type=kotlin.Boolean operator=NOT_IN arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN $this: GET_VAR x type=kotlin.collections.Collection operator=null element: GET_VAR a type=kotlin.Any operator=null @@ -25,7 +25,7 @@ IrFile /in.kt IrExpressionBody BLOCK type= hasResult=false operator=null RETURN type= - CALL .NOT type=kotlin.Boolean operator=EXCL + CALL .NOT type=kotlin.Boolean operator=NOT_IN arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN $this: GET_VAR x type=kotlin.collections.Collection operator=null element: GET_VAR a type=T operator=null