diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirBodyResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirBodyResolveTransformer.kt index 9f29a8d8540..2989e69a63d 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirBodyResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirBodyResolveTransformer.kt @@ -561,7 +561,7 @@ open class FirBodyResolveTransformer( private fun FirWhenExpression.replaceReturnTypeIfNotExhaustive(): FirWhenExpression { if (!isExhaustive) { - resultType = resultType.resolvedTypeFromPrototype(session.builtinTypes.nullableAnyType.type) + resultType = resultType.resolvedTypeFromPrototype(session.builtinTypes.unitType.type) } return this } diff --git a/compiler/fir/resolve/testData/resolve/exhaustiveness_boolean.txt b/compiler/fir/resolve/testData/resolve/exhaustiveness_boolean.txt index cb3b2d9b52b..72efeabf878 100644 --- a/compiler/fir/resolve/testData/resolve/exhaustiveness_boolean.txt +++ b/compiler/fir/resolve/testData/resolve/exhaustiveness_boolean.txt @@ -1,6 +1,6 @@ FILE: exhaustiveness_boolean.kt public final fun test_1(b: R|kotlin/Boolean|): R|kotlin/Unit| { - lval x: R|kotlin/Any?| = when (R|/b|) { + lval x: R|kotlin/Unit| = when (R|/b|) { ==($subj$, Boolean(true)) -> { Int(1) } @@ -26,7 +26,7 @@ FILE: exhaustiveness_boolean.kt } public final fun test_2(b: R|kotlin/Boolean?|): R|kotlin/Unit| { - lval x: R|kotlin/Any?| = when (R|/b|) { + lval x: R|kotlin/Unit| = when (R|/b|) { ==($subj$, Boolean(true)) -> { Int(1) } diff --git a/compiler/fir/resolve/testData/resolve/exhaustiveness_enum.txt b/compiler/fir/resolve/testData/resolve/exhaustiveness_enum.txt index 2a1c00da6c1..86a64520bd7 100644 --- a/compiler/fir/resolve/testData/resolve/exhaustiveness_enum.txt +++ b/compiler/fir/resolve/testData/resolve/exhaustiveness_enum.txt @@ -27,7 +27,7 @@ FILE: exhaustiveness_enum.kt } public final fun test_1(e: R|Enum|): R|kotlin/Unit| { - lval a: R|kotlin/Any?| = when (R|/e|) { + lval a: R|kotlin/Unit| = when (R|/e|) { ==($subj$, Q|Enum.A|) -> { Int(1) } @@ -36,7 +36,7 @@ FILE: exhaustiveness_enum.kt } } - lval b: R|kotlin/Any?| = when (R|/e|) { + lval b: R|kotlin/Unit| = when (R|/e|) { ==($subj$, Q|Enum.A|) -> { Int(1) } @@ -71,7 +71,7 @@ FILE: exhaustiveness_enum.kt } public final fun test_2(e: R|Enum?|): R|kotlin/Unit| { - lval a: R|kotlin/Any?| = when (R|/e|) { + lval a: R|kotlin/Unit| = when (R|/e|) { ==($subj$, Q|Enum.A|) -> { Int(1) } diff --git a/compiler/fir/resolve/testData/resolve/exhaustiveness_sealedClass.txt b/compiler/fir/resolve/testData/resolve/exhaustiveness_sealedClass.txt index b075fd05446..dcc4a0f1f16 100644 --- a/compiler/fir/resolve/testData/resolve/exhaustiveness_sealedClass.txt +++ b/compiler/fir/resolve/testData/resolve/exhaustiveness_sealedClass.txt @@ -26,7 +26,7 @@ FILE: exhaustiveness_sealedClass.kt } public final fun test_1(e: R|Base|): R|kotlin/Unit| { - lval a: R|kotlin/Any?| = when (R|/e|) { + lval a: R|kotlin/Unit| = when (R|/e|) { ($subj$ is R|Base.A|) -> { Int(1) } @@ -35,7 +35,7 @@ FILE: exhaustiveness_sealedClass.kt } } - lval b: R|kotlin/Any?| = when (R|/e|) { + lval b: R|kotlin/Unit| = when (R|/e|) { ($subj$ is R|Base.A|) -> { Int(1) } @@ -70,7 +70,7 @@ FILE: exhaustiveness_sealedClass.kt } public final fun test_2(e: R|Base?|): R|kotlin/Unit| { - lval a: R|kotlin/Any?| = when (R|/e|) { + lval a: R|kotlin/Unit| = when (R|/e|) { ($subj$ is R|Base.A|) -> { Int(1) } diff --git a/compiler/testData/ir/irText/expressions/bangbang.fir.txt b/compiler/testData/ir/irText/expressions/bangbang.fir.txt index bc02e34c8cf..0ba9f82bc71 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.fir.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.fir.txt @@ -59,7 +59,7 @@ FILE fqName: fileName:/bangbang.kt TYPE_PARAMETER name:X index:0 variance: superTypes:[] VALUE_PARAMETER name:a index:0 type:X of .test4 BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String? GET_VAR 'a: X of .test4 declared in .test4' type=X of .test4 origin=null @@ -76,7 +76,7 @@ FILE fqName: fileName:/bangbang.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String origin=null - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String? GET_VAR 'a: X of .test4 declared in .test4' type=X of .test4 origin=null diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt index ed4f0c4c0f1..8f60da1416a 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt @@ -103,7 +103,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt CONST Int type=kotlin.Int value=0 WHILE label=Outer origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true - body: BLOCK type=kotlin.Any? origin=null + body: BLOCK type=kotlin.Unit origin=null VAR name: type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null SET_VAR 'var i: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null @@ -129,7 +129,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: BREAK label=null loop.label=Outer - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF 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 'var i: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt index 28ce84726e7..6f9d9a0c93f 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt @@ -19,11 +19,11 @@ FILE fqName: fileName:/breakContinueInWhen.kt WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testBreakFor' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Any? origin=null + body: BLOCK type=kotlin.Unit origin=null VAR name:x type:kotlin.Int [val] CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testBreakFor' type=kotlin.collections.IntIterator origin=null - WHEN type=kotlin.Any? origin=WHEN + WHEN type=kotlin.Unit origin=WHEN BRANCH if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testBreakFor' type=kotlin.Int origin=null @@ -37,7 +37,7 @@ FILE fqName: fileName:/breakContinueInWhen.kt condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testBreakWhile' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=10 - body: WHEN type=kotlin.Any? origin=WHEN + body: WHEN type=kotlin.Unit origin=WHEN BRANCH if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testBreakWhile' type=kotlin.Int origin=null @@ -48,7 +48,7 @@ FILE fqName: fileName:/breakContinueInWhen.kt VAR name:k type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 DO_WHILE label=null origin=DO_WHILE_LOOP - body: WHEN type=kotlin.Any? origin=WHEN + body: WHEN type=kotlin.Unit origin=WHEN BRANCH if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testBreakDoWhile' type=kotlin.Int origin=null @@ -77,11 +77,11 @@ FILE fqName: fileName:/breakContinueInWhen.kt WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testContinueFor' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Any? origin=null + body: BLOCK type=kotlin.Unit origin=null VAR name:x type:kotlin.Int [val] CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testContinueFor' type=kotlin.collections.IntIterator origin=null - WHEN type=kotlin.Any? origin=WHEN + WHEN type=kotlin.Unit origin=WHEN BRANCH if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testContinueFor' type=kotlin.Int origin=null @@ -95,7 +95,7 @@ FILE fqName: fileName:/breakContinueInWhen.kt condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testContinueWhile' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=10 - body: WHEN type=kotlin.Any? origin=WHEN + body: WHEN type=kotlin.Unit origin=WHEN BRANCH if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testContinueWhile' type=kotlin.Int origin=null @@ -115,7 +115,7 @@ FILE fqName: fileName:/breakContinueInWhen.kt CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .testContinueDoWhile' type=kotlin.Int origin=null GET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null - WHEN type=kotlin.Any? origin=WHEN + WHEN type=kotlin.Unit origin=WHEN BRANCH if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null @@ -128,7 +128,7 @@ FILE fqName: fileName:/breakContinueInWhen.kt condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT arg0: GET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=10 - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ diff --git a/compiler/testData/ir/irText/expressions/elvis.fir.txt b/compiler/testData/ir/irText/expressions/elvis.fir.txt index 9bea8c04a2c..e916d3367da 100644 --- a/compiler/testData/ir/irText/expressions/elvis.fir.txt +++ b/compiler/testData/ir/irText/expressions/elvis.fir.txt @@ -50,13 +50,13 @@ FILE fqName: fileName:/elvis.kt VALUE_PARAMETER name:a index:0 type:kotlin.Any? VALUE_PARAMETER name:b index:1 type:kotlin.Any? BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'b: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null then: RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in ' CONST String type=kotlin.String value="" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String? GET_VAR 'a: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt index 4d2f06c4834..1b8f933ec20 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt @@ -17,7 +17,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt FUN name:testSmartCastInWhenSubject visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Int VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testSmartCastInWhenSubject' type=kotlin.Any origin=null @@ -40,7 +40,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt VALUE_PARAMETER name:x index:0 type:kotlin.Double VALUE_PARAMETER name:y index:1 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .testSmartCastInWhenCondition' type=kotlin.Any origin=null @@ -83,14 +83,14 @@ FILE fqName: fileName:/whenByFloatingPoint.kt VALUE_PARAMETER name:x index:0 type:kotlin.Any VALUE_PARAMETER name:y index:1 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testSmartCastToDifferentTypes' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastToDifferentTypes (x: kotlin.Any, y: kotlin.Any): kotlin.Int declared in ' CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value=1 - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .testSmartCastToDifferentTypes' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/ifElseIf.fir.txt b/compiler/testData/ir/irText/expressions/ifElseIf.fir.txt index 4828831aa20..6556643aa7d 100644 --- a/compiler/testData/ir/irText/expressions/ifElseIf.fir.txt +++ b/compiler/testData/ir/irText/expressions/ifElseIf.fir.txt @@ -31,7 +31,7 @@ FILE fqName: fileName:/ifElseIf.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: GET_VAR 'flag: kotlin.Boolean declared in .testEmptyBranches1' type=kotlin.Boolean origin=null then: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/expressions/implicitCastInReturnFromConstructor.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastInReturnFromConstructor.fir.txt index 9b84cd16efc..e69cf46dc11 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastInReturnFromConstructor.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastInReturnFromConstructor.fir.txt @@ -8,7 +8,7 @@ FILE fqName: fileName:/implicitCastInReturnFromConstructor.kt CONSTRUCTOR visibility:public <> (x:kotlin.Any?) returnType:.C VALUE_PARAMETER name:x index:0 type:kotlin.Any? BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Unit GET_VAR 'x: kotlin.Any? declared in .C.' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt index 32025ebd925..787f5f5fa4e 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt @@ -62,7 +62,7 @@ FILE fqName: fileName:/implicitCastToNonNull.kt VALUE_PARAMETER name:x index:0 type:T of .test5 VALUE_PARAMETER name:fn index:1 type:kotlin.Function1.test5, kotlin.Unit> BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ diff --git a/compiler/testData/ir/irText/expressions/kt24804.fir.txt b/compiler/testData/ir/irText/expressions/kt24804.fir.txt index 601222c1741..27b548313f4 100644 --- a/compiler/testData/ir/irText/expressions/kt24804.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt24804.fir.txt @@ -10,21 +10,21 @@ FILE fqName: fileName:/kt24804.kt VAR name:z type:kotlin.Int [var] CONST Int type=kotlin.Int value=10 DO_WHILE label=l2 origin=DO_WHILE_LOOP - body: BLOCK type=kotlin.Any? origin=null + body: BLOCK type=kotlin.Unit origin=null SET_VAR 'var z: kotlin.Int [var] declared in .run' type=kotlin.Int origin=null CONST Int type=kotlin.Int value=1 - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT arg0: GET_VAR 'var z: kotlin.Int [var] declared in .run' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=100 then: RETURN type=kotlin.Nothing from='public final fun run (x: kotlin.Boolean, y: kotlin.Boolean): kotlin.String declared in ' CONST String type=kotlin.String value="NOT_OK" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: GET_VAR 'x: kotlin.Boolean declared in .run' type=kotlin.Boolean origin=null then: ERROR_EXPR 'Unbound loop: continue@@@[ERROR_EXPR(Cannot bind label l1 to a loop)] ' type=kotlin.Nothing - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: GET_VAR 'y: kotlin.Boolean declared in .run' type=kotlin.Boolean origin=null then: CONTINUE label=l2 loop.label=l2 diff --git a/compiler/testData/ir/irText/expressions/kt27933.fir.txt b/compiler/testData/ir/irText/expressions/kt27933.fir.txt index b241bb649a1..8103ccaf2aa 100644 --- a/compiler/testData/ir/irText/expressions/kt27933.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt27933.fir.txt @@ -15,7 +15,7 @@ FILE fqName: fileName:/kt27933.kt then: BLOCK type=kotlin.Unit origin=null SET_VAR 'var r: kotlin.String [var] declared in .box' type=kotlin.String origin=null CONST String type=kotlin.String value="O" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF 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 'var r: kotlin.String [var] declared in .box' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt index aa3bddd7dfa..be9cc6cb1ec 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test1' type=kotlin.Function0 origin=null @@ -11,7 +11,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test2' type=kotlin.Function0 origin=null @@ -21,7 +21,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null @@ -33,7 +33,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt VALUE_PARAMETER name:a index:0 type:kotlin.Function0 VALUE_PARAMETER name:b index:1 type:kotlin.Function0 BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test4' type=kotlin.Function0 origin=null @@ -44,7 +44,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null @@ -54,7 +54,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt FUN name:test5x visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Any declared in .test5x' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt index a6a2d94310a..6f3b1cc2016 100644 --- a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt @@ -9,7 +9,7 @@ FILE fqName: fileName:/Derived.kt $this: VALUE_PARAMETER name: type:.Derived VALUE_PARAMETER name:v index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/smartCasts.fir.txt b/compiler/testData/ir/irText/expressions/smartCasts.fir.txt index 7b974f10638..d6166c8c12a 100644 --- a/compiler/testData/ir/irText/expressions/smartCasts.fir.txt +++ b/compiler/testData/ir/irText/expressions/smartCasts.fir.txt @@ -18,7 +18,7 @@ FILE fqName: fileName:/smartCasts.kt FUN name:test1 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.Any origin=null @@ -38,7 +38,7 @@ FILE fqName: fileName:/smartCasts.kt FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Any origin=null @@ -50,7 +50,7 @@ FILE fqName: fileName:/smartCasts.kt FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt index 5d292cd8a56..8d074ef72f8 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt @@ -42,7 +42,7 @@ FILE fqName: fileName:/smartCastsWithDestructuring.kt FUN name:test visibility:public modality:FINAL <> (x:.I1) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:.I1 BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.I2 GET_VAR 'x: .I1 declared in .test' type=.I1 origin=null diff --git a/compiler/testData/ir/irText/expressions/throw.fir.txt b/compiler/testData/ir/irText/expressions/throw.fir.txt index 02ae7954324..ff79ded8a7a 100644 --- a/compiler/testData/ir/irText/expressions/throw.fir.txt +++ b/compiler/testData/ir/irText/expressions/throw.fir.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/throw.kt FUN name:testImplicitCast visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Throwable GET_VAR 'a: kotlin.Any declared in .testImplicitCast' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.fir.txt b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.fir.txt index 2524d311956..9c2c32bbaed 100644 --- a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.fir.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/tryCatchWithImplicitCast.kt FUN name:testImplicitCast visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'a: kotlin.Any declared in .testImplicitCast' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt b/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt index c3de50d3c44..a8b21c00efb 100644 --- a/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt +++ b/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt @@ -149,7 +149,7 @@ FILE fqName: fileName:/useImportedMember.kt VALUE_PARAMETER name:g index:0 type:kotlin.String FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -159,7 +159,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST Int type=kotlin.Int value=1 then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="1" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -169,7 +169,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST Int type=kotlin.Int value=2 then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="2" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -178,7 +178,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST Int type=kotlin.Int value=3 then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="3" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -190,7 +190,7 @@ FILE fqName: fileName:/useImportedMember.kt SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Unit origin=null receiver: GET_VAR ': .C declared in .C' type=.C origin=null value: CONST Int type=kotlin.Int value=5 - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -199,7 +199,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST Int type=kotlin.Int value=5 then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="5" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -208,7 +208,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST Int type=kotlin.Int value=6 then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="6" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -219,7 +219,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST String type=kotlin.String value="7" then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="7" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -228,7 +228,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST String type=kotlin.String value="8" then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="8" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -238,7 +238,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST Int type=kotlin.Int value=9 then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="9" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ @@ -247,7 +247,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST String type=kotlin.String value="10" then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="10" - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ diff --git a/compiler/testData/ir/irText/expressions/varargWithImplicitCast.fir.txt b/compiler/testData/ir/irText/expressions/varargWithImplicitCast.fir.txt index cc4a0a0de43..3b93d65dfcb 100644 --- a/compiler/testData/ir/irText/expressions/varargWithImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/expressions/varargWithImplicitCast.fir.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/varargWithImplicitCast.kt FUN name:testScalar visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.IntArray VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Int GET_VAR 'a: kotlin.Any declared in .testScalar' type=kotlin.Any origin=null @@ -14,7 +14,7 @@ FILE fqName: fileName:/varargWithImplicitCast.kt FUN name:testSpread visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.IntArray VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.IntArray GET_VAR 'a: kotlin.Any declared in .testSpread' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/whenCoercedToUnit.fir.txt b/compiler/testData/ir/irText/expressions/whenCoercedToUnit.fir.txt index 18842a2d93a..da87de4dc9e 100644 --- a/compiler/testData/ir/irText/expressions/whenCoercedToUnit.fir.txt +++ b/compiler/testData/ir/irText/expressions/whenCoercedToUnit.fir.txt @@ -2,9 +2,9 @@ FILE fqName: fileName:/whenCoercedToUnit.kt FUN name:foo visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY - BLOCK type=kotlin.Any? origin=WHEN + BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.Int [val] - WHEN type=kotlin.Any? origin=WHEN + WHEN type=kotlin.Unit origin=WHEN 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 tmp0_subject: kotlin.Int [val] declared in .foo' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt index 4cba37b1108..1940a72c661 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt @@ -61,7 +61,7 @@ FILE fqName: fileName:/whileDoWhile.kt BLOCK_BODY VAR name:a type:kotlin.Any? [val] CONST Null type=kotlin.Nothing? value=null - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Boolean GET_VAR 'val a: kotlin.Any? [val] declared in .testSmartcastInCondition' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/lambdas/nonLocalReturn.fir.txt b/compiler/testData/ir/irText/lambdas/nonLocalReturn.fir.txt index c63ffaa94e9..40cf61d9c90 100644 --- a/compiler/testData/ir/irText/lambdas/nonLocalReturn.fir.txt +++ b/compiler/testData/ir/irText/lambdas/nonLocalReturn.fir.txt @@ -44,7 +44,7 @@ FILE fqName: fileName:/nonLocalReturn.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER name:it index:0 type:kotlin.Int BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF 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 'it: kotlin.Int declared in .testLrmFoo1.' type=kotlin.Int origin=null @@ -62,7 +62,7 @@ FILE fqName: fileName:/nonLocalReturn.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER name:it index:0 type:kotlin.Int BLOCK_BODY - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF 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 'it: kotlin.Int declared in .testLrmFoo2.' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt index 5d71d3b1943..f3d0683d9a6 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt @@ -13,7 +13,7 @@ FILE fqName: fileName:/coercionInLoop.kt condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null $this: GET_VAR 'val x: kotlin.collections.DoubleIterator [val] declared in .box' type=kotlin.collections.DoubleIterator origin=null body: BLOCK type=kotlin.Int origin=null - WHEN type=kotlin.Any? origin=IF + WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ diff --git a/compiler/testData/ir/irText/regressions/kt24114.fir.txt b/compiler/testData/ir/irText/regressions/kt24114.fir.txt index 37f32d53337..dc4e9d4ef00 100644 --- a/compiler/testData/ir/irText/regressions/kt24114.fir.txt +++ b/compiler/testData/ir/irText/regressions/kt24114.fir.txt @@ -11,16 +11,16 @@ FILE fqName: fileName:/kt24114.kt BLOCK_BODY WHILE label=null origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true - body: BLOCK type=kotlin.Any? origin=WHEN + body: BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.Int [val] - WHEN type=kotlin.Any? origin=WHEN + WHEN type=kotlin.Unit origin=WHEN 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 tmp0_subject: kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Any? origin=WHEN + then: BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp1_subject type:kotlin.Int [val] - WHEN type=kotlin.Any? origin=WHEN + WHEN type=kotlin.Unit origin=WHEN 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 tmp1_subject: kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null @@ -35,16 +35,16 @@ FILE fqName: fileName:/kt24114.kt BLOCK_BODY WHILE label=null origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true - body: BLOCK type=kotlin.Any? origin=WHEN + body: BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp2_subject type:kotlin.Int [val] - WHEN type=kotlin.Any? origin=WHEN + WHEN type=kotlin.Unit origin=WHEN 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 tmp2_subject: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Any? origin=WHEN + then: BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp3_subject type:kotlin.Int [val] - WHEN type=kotlin.Any? origin=WHEN + WHEN type=kotlin.Unit origin=WHEN 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 tmp3_subject: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null