diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index daa01245dea..e5c758a0f38 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -1194,7 +1194,8 @@ class Fir2IrVisitor( branches: List, resultType: IrType ): IrExpression { - val irWhen = IrWhenImpl(startOffset, endOffset, resultType, origin, branches) + // Note: ELVIS origin is set only on wrapping block + val irWhen = IrWhenImpl(startOffset, endOffset, resultType, origin.takeIf { it != IrStatementOrigin.ELVIS }, branches) return if (subjectVariable == null) { irWhen } else { diff --git a/compiler/testData/codegen/box/annotations/javaTargetOnPrimaryCtorParameter.fir.ir.txt b/compiler/testData/codegen/box/annotations/javaTargetOnPrimaryCtorParameter.fir.ir.txt index e2e58d0aec3..90e1e4c9938 100644 --- a/compiler/testData/codegen/box/annotations/javaTargetOnPrimaryCtorParameter.fir.ir.txt +++ b/compiler/testData/codegen/box/annotations/javaTargetOnPrimaryCtorParameter.fir.ir.txt @@ -73,7 +73,7 @@ FILE fqName: fileName:/test.kt $this: CALL 'public final fun (): kotlin.reflect.KClass> declared in kotlin.jvm' type=kotlin.reflect.KClass origin=GET_PROPERTY : kotlin.Annotation $receiver: GET_VAR 'it: kotlin.Annotation declared in .box.' type=kotlin.Annotation origin=null - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: kotlin.String? declared in .box.' type=kotlin.String? origin=null @@ -107,7 +107,7 @@ FILE fqName: fileName:/test.kt : @[FlexibleNullability] kotlin.Annotation? $receiver: TYPE_OP type=kotlin.Annotation origin=IMPLICIT_NOTNULL typeOperand=kotlin.Annotation GET_VAR 'it: @[FlexibleNullability] kotlin.Annotation? declared in .box.' type=@[FlexibleNullability] kotlin.Annotation? origin=null - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: kotlin.String? declared in .box.' type=kotlin.String? origin=null diff --git a/compiler/testData/codegen/box/annotations/targetOnPrimaryCtorParameter.fir.ir.txt b/compiler/testData/codegen/box/annotations/targetOnPrimaryCtorParameter.fir.ir.txt index 8eee5eb2490..9048d43f01c 100644 --- a/compiler/testData/codegen/box/annotations/targetOnPrimaryCtorParameter.fir.ir.txt +++ b/compiler/testData/codegen/box/annotations/targetOnPrimaryCtorParameter.fir.ir.txt @@ -200,7 +200,7 @@ FILE fqName: fileName:/targetOnPrimaryCtorParameter.kt $this: CALL 'public final fun (): kotlin.reflect.KClass> declared in kotlin.jvm' type=kotlin.reflect.KClass origin=GET_PROPERTY : kotlin.Annotation $receiver: GET_VAR 'it: kotlin.Annotation declared in .box.' type=kotlin.Annotation origin=null - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: kotlin.String? declared in .box.' type=kotlin.String? origin=null @@ -232,7 +232,7 @@ FILE fqName: fileName:/targetOnPrimaryCtorParameter.kt $this: CALL 'public final fun (): kotlin.reflect.KClass> declared in kotlin.jvm' type=kotlin.reflect.KClass origin=GET_PROPERTY : kotlin.Annotation $receiver: GET_VAR 'it: kotlin.Annotation declared in .box.' type=kotlin.Annotation origin=null - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: kotlin.String? declared in .box.' type=kotlin.String? origin=null @@ -266,7 +266,7 @@ FILE fqName: fileName:/targetOnPrimaryCtorParameter.kt : @[FlexibleNullability] kotlin.Annotation? $receiver: TYPE_OP type=kotlin.Annotation origin=IMPLICIT_NOTNULL typeOperand=kotlin.Annotation GET_VAR 'it: @[FlexibleNullability] kotlin.Annotation? declared in .box.' type=@[FlexibleNullability] kotlin.Annotation? origin=null - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_2: kotlin.String? declared in .box.' type=kotlin.String? origin=null diff --git a/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt b/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt index a14b80e9885..d5ed1ab232a 100644 --- a/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt +++ b/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt @@ -34,7 +34,7 @@ FILE fqName: fileName:/noSymbolForIntRangeIterator.kt VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int? [val] CALL 'public final fun toIntOrNull (): kotlin.Int? declared in kotlin.text' type=kotlin.Int? origin=null $receiver: GET_VAR 'it: kotlin.String declared in .takeString.' type=kotlin.String origin=null - WHEN type=kotlin.Int origin=ELVIS + WHEN type=kotlin.Int origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: kotlin.Int? declared in .takeString.' type=kotlin.Int? origin=null diff --git a/compiler/testData/codegen/box/smartCasts/kt44814.fir.ir.txt b/compiler/testData/codegen/box/smartCasts/kt44814.fir.ir.txt index db886570d72..4d8d58d15df 100644 --- a/compiler/testData/codegen/box/smartCasts/kt44814.fir.ir.txt +++ b/compiler/testData/codegen/box/smartCasts/kt44814.fir.ir.txt @@ -717,7 +717,7 @@ FILE fqName: fileName:/kt44814.kt $this: GET_VAR 'val tmp_4: .LighterASTNode? declared in .FirModifierList.Companion.getModifierList.' type=.LighterASTNode? origin=null arg1: CALL 'public final fun (): .TokenType declared in .TokenType.Companion' type=.TokenType origin=GET_PROPERTY $this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=.TokenType.Companion - WHEN type=.LighterASTNode origin=ELVIS + WHEN type=.LighterASTNode origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_3: .LighterASTNode? declared in .FirModifierList.Companion.getModifierList' type=.LighterASTNode? origin=null diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.ir.txt index d690a327dff..822b133f85d 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.ir.txt @@ -174,7 +174,7 @@ FILE fqName: fileName:/arrayAccessOperators.kt $receiver: GET_VAR 'val myContainer: .MyContainer declared in .box.' type=.MyContainer origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null index: CONST Int type=kotlin.Int value=0 - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: kotlin.String? declared in .box.' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/declarations/kt47527.fir.ir.txt b/compiler/testData/ir/irText/declarations/kt47527.fir.ir.txt index a697b93a11c..44b527cef9a 100644 --- a/compiler/testData/ir/irText/declarations/kt47527.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/kt47527.fir.ir.txt @@ -66,7 +66,7 @@ FILE fqName: fileName:/kt47527.kt VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.String? [val] CALL 'public final fun test_1 (value: kotlin.Any?): kotlin.String? declared in ' type=kotlin.String? origin=null value: CONST Int type=kotlin.Int value=1 - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_2: kotlin.String? declared in .box' type=kotlin.String? origin=null @@ -83,7 +83,7 @@ FILE fqName: fileName:/kt47527.kt VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.String? [val] CALL 'public final fun test_2 (value: kotlin.Any?): kotlin.String? declared in ' type=kotlin.String? origin=null value: CONST Int type=kotlin.Int value=1 - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_3: kotlin.String? declared in .box' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.ir.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.ir.txt index 66f282fcccd..c7baf11a721 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.ir.txt @@ -9,7 +9,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt condition: BLOCK type=kotlin.Boolean origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Boolean? [val] GET_VAR 'c: kotlin.Boolean? declared in .test1' type=kotlin.Boolean? origin=null - WHEN type=kotlin.Boolean origin=ELVIS + WHEN type=kotlin.Boolean origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: kotlin.Boolean? declared in .test1' type=kotlin.Boolean? origin=null @@ -29,7 +29,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt condition: BLOCK type=kotlin.Boolean origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Boolean? [val] GET_VAR 'c: kotlin.Boolean? declared in .test2' type=kotlin.Boolean? origin=null - WHEN type=kotlin.Boolean origin=ELVIS + WHEN type=kotlin.Boolean origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: kotlin.Boolean? declared in .test2' type=kotlin.Boolean? origin=null @@ -51,7 +51,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt $this: BLOCK type=kotlin.collections.List origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.List? [val] GET_VAR 'ss: kotlin.collections.List? declared in .test3' type=kotlin.collections.List? origin=null - WHEN type=kotlin.collections.List origin=ELVIS + WHEN type=kotlin.collections.List origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_3: kotlin.collections.List? declared in .test3' type=kotlin.collections.List? origin=null @@ -80,7 +80,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt $this: BLOCK type=kotlin.collections.List origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.collections.List? [val] GET_VAR 'ss: kotlin.collections.List? declared in .test4' type=kotlin.collections.List? origin=null - WHEN type=kotlin.collections.List origin=ELVIS + WHEN type=kotlin.collections.List origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_5: kotlin.collections.List? declared in .test4' type=kotlin.collections.List? origin=null diff --git a/compiler/testData/ir/irText/expressions/elvis.fir.ir.txt b/compiler/testData/ir/irText/expressions/elvis.fir.ir.txt index eba6ff47841..09cda5fd2a8 100644 --- a/compiler/testData/ir/irText/expressions/elvis.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/elvis.fir.ir.txt @@ -20,7 +20,7 @@ FILE fqName: fileName:/elvis.kt BLOCK type=kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val] GET_VAR 'a: kotlin.Any? declared in .test1' type=kotlin.Any? origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: kotlin.Any? declared in .test1' type=kotlin.Any? origin=null @@ -37,7 +37,7 @@ FILE fqName: fileName:/elvis.kt BLOCK type=kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.String? [val] GET_VAR 'a: kotlin.String? declared in .test2' type=kotlin.String? origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: kotlin.String? declared in .test2' type=kotlin.String? origin=null @@ -67,7 +67,7 @@ FILE fqName: fileName:/elvis.kt VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.String? [val] TYPE_OP type=kotlin.String? origin=IMPLICIT_CAST typeOperand=kotlin.String? GET_VAR 'a: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_2: kotlin.String? declared in .test3' type=kotlin.String? origin=null @@ -84,7 +84,7 @@ FILE fqName: fileName:/elvis.kt BLOCK type=kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Any? [val] CALL 'public final fun (): kotlin.Any? declared in ' type=kotlin.Any? origin=GET_PROPERTY - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_3: kotlin.Any? declared in .test4' type=kotlin.Any? origin=null @@ -100,7 +100,7 @@ FILE fqName: fileName:/elvis.kt BLOCK type=kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Any? [val] CALL 'public final fun foo (): kotlin.Any? declared in ' type=kotlin.Any? origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_4: kotlin.Any? declared in .test5' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/kt30796.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt30796.fir.ir.txt index 11086c5321f..dcde403068b 100644 --- a/compiler/testData/ir/irText/expressions/kt30796.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt30796.fir.ir.txt @@ -13,7 +13,7 @@ FILE fqName: fileName:/kt30796.kt BLOCK type=kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: T of .test declared in .test' type=T of .test origin=null @@ -26,7 +26,7 @@ FILE fqName: fileName:/kt30796.kt BLOCK type=kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: T of .test declared in .test' type=T of .test origin=null @@ -34,7 +34,7 @@ FILE fqName: fileName:/kt30796.kt then: BLOCK type=kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:T of .test [val] GET_VAR 'value2: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_2: T of .test declared in .test' type=T of .test origin=null @@ -52,7 +52,7 @@ FILE fqName: fileName:/kt30796.kt BLOCK type=kotlin.Any? origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any? origin=ELVIS + WHEN type=kotlin.Any? origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_4: T of .test declared in .test' type=T of .test origin=null @@ -61,7 +61,7 @@ FILE fqName: fileName:/kt30796.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val tmp_4: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_3: kotlin.Any? declared in .test' type=kotlin.Any? origin=null @@ -76,7 +76,7 @@ FILE fqName: fileName:/kt30796.kt BLOCK type=kotlin.Any? origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any? origin=ELVIS + WHEN type=kotlin.Any? origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_6: T of .test declared in .test' type=T of .test origin=null @@ -85,7 +85,7 @@ FILE fqName: fileName:/kt30796.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val tmp_6: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_5: kotlin.Any? declared in .test' type=kotlin.Any? origin=null @@ -99,7 +99,7 @@ FILE fqName: fileName:/kt30796.kt VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Any? [val] CALL 'public final fun magic (): T of .magic declared in ' type=kotlin.Any? origin=null : kotlin.Any? - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_7: kotlin.Any? declared in .test' type=kotlin.Any? origin=null @@ -114,7 +114,7 @@ FILE fqName: fileName:/kt30796.kt BLOCK type=kotlin.Any? origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any? origin=ELVIS + WHEN type=kotlin.Any? origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_9: T of .test declared in .test' type=T of .test origin=null @@ -124,7 +124,7 @@ FILE fqName: fileName:/kt30796.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val tmp_9: T of .test declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_8: kotlin.Any? declared in .test' type=kotlin.Any? origin=null @@ -140,7 +140,7 @@ FILE fqName: fileName:/kt30796.kt VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Any? [val] CALL 'public final fun magic (): T of .magic declared in ' type=kotlin.Any? origin=null : kotlin.Any? - WHEN type=kotlin.Any? origin=ELVIS + WHEN type=kotlin.Any? origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_11: kotlin.Any? declared in .test' type=kotlin.Any? origin=null @@ -149,7 +149,7 @@ FILE fqName: fileName:/kt30796.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val tmp_11: kotlin.Any? declared in .test' type=kotlin.Any? origin=null - WHEN type=kotlin.Any origin=ELVIS + WHEN type=kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_10: kotlin.Any? declared in .test' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.ir.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.ir.txt index 04546ac910a..f029c183dcf 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.ir.txt @@ -157,7 +157,7 @@ FILE fqName: fileName:/ClashResolutionDescriptor.kt $this: CALL 'private final fun (): java.util.HashMap declared in ' type=java.util.HashMap origin=GET_PROPERTY p0: CALL 'public final fun (): java.lang.Class.PlatformExtensionsClashResolver> declared in .PlatformExtensionsClashResolver' type=java.lang.Class.PlatformSpecificExtension.PlatformSpecificExtension.PlatformSpecificExtension.PlatformSpecificExtension.PlatformSpecificExtension>>>>> origin=GET_PROPERTY $this: GET_VAR 'val resolver: .PlatformExtensionsClashResolver<*> declared in .resolveClashesIfAny' type=.PlatformExtensionsClashResolver<*> origin=null - WHEN type=kotlin.collections.Collection<.ComponentDescriptor> origin=ELVIS + WHEN type=kotlin.collections.Collection<.ComponentDescriptor> origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: kotlin.collections.Collection<.ComponentDescriptor>? declared in .resolveClashesIfAny' type=kotlin.collections.Collection<.ComponentDescriptor>? origin=null diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.ir.txt b/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.ir.txt index 04e6f3f387e..6af5e2bd87b 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.ir.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.ir.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/dynamicElvisOperator.kt BLOCK type=dynamic origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:dynamic [val] GET_VAR 'd: dynamic declared in .test' type=dynamic origin=null - WHEN type=dynamic origin=ELVIS + WHEN type=dynamic origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: dynamic declared in .test' type=dynamic origin=null diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.ir.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.ir.txt index 1aaf605f7be..e58567b68c6 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.ir.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.ir.txt @@ -105,7 +105,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt element: BLOCK type=@[ParameterName(name = 'value')] kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:@[ParameterName(name = 'value')] kotlin.Any? [val] GET_VAR 'value: @[ParameterName(name = 'value')] kotlin.Any? declared in .asFairChannel..' type=@[ParameterName(name = 'value')] kotlin.Any? origin=null - WHEN type=@[ParameterName(name = 'value')] kotlin.Any origin=ELVIS + WHEN type=@[ParameterName(name = 'value')] kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: @[ParameterName(name = 'value')] kotlin.Any? declared in .asFairChannel..' type=@[ParameterName(name = 'value')] kotlin.Any? origin=null @@ -140,7 +140,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt e: BLOCK type=@[ParameterName(name = 'value')] kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:@[ParameterName(name = 'value')] kotlin.Any? [val] GET_VAR 'value: @[ParameterName(name = 'value')] kotlin.Any? declared in .asChannel..' type=@[ParameterName(name = 'value')] kotlin.Any? origin=null - WHEN type=@[ParameterName(name = 'value')] kotlin.Any origin=ELVIS + WHEN type=@[ParameterName(name = 'value')] kotlin.Any origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: @[ParameterName(name = 'value')] kotlin.Any? declared in .asChannel..' type=@[ParameterName(name = 'value')] kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/types/definitelyNonNull.fir.ir.txt b/compiler/testData/ir/irText/types/definitelyNonNull.fir.ir.txt index a320667cb00..e13ced597cb 100644 --- a/compiler/testData/ir/irText/types/definitelyNonNull.fir.ir.txt +++ b/compiler/testData/ir/irText/types/definitelyNonNull.fir.ir.txt @@ -8,7 +8,7 @@ FILE fqName: fileName:/definitelyNonNull.kt BLOCK type={T of .elvisLike & Any} origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:T of .elvisLike [val] GET_VAR 'x: T of .elvisLike declared in .elvisLike' type=T of .elvisLike origin=null - WHEN type={T of .elvisLike & Any} origin=ELVIS + WHEN type={T of .elvisLike & Any} origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: T of .elvisLike declared in .elvisLike' type=T of .elvisLike origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.ir.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.ir.txt index dc4ed420ad3..96804e4dc49 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.ir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.ir.txt @@ -11,7 +11,7 @@ FILE fqName: fileName:/nullCheckInElvisRhs.kt BLOCK type=kotlin.String origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.String? [val] CALL 'public final fun baz (): kotlin.String? declared in ' type=kotlin.String? origin=null - WHEN type=kotlin.String origin=ELVIS + WHEN type=kotlin.String origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_0: kotlin.String? declared in .test' type=kotlin.String? origin=null