From 5c29af4b53d57d517b259923b2ded3a0a63f719e Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Fri, 30 Aug 2019 15:55:33 +0300 Subject: [PATCH] [FIR] Tests. Update some outdated FIR testdata --- .../rawBuilder/expressions/nullability.txt | 4 +- .../stdlib/factoryFunctionOverloads.txt | 2 +- .../testData/resolve/stdlib/hashSet.txt | 2 +- .../resolve/stdlib/typeParameterDerived.txt | 4 +- .../testData/resolve/whenAsReceiver.txt | 2 +- .../ir/irText/expressions/bangbang.fir.txt | 48 +++++++-------- .../breakContinueInLoopHeader.fir.txt | 8 +-- .../expressions/chainOfSafeCalls.fir.txt | 10 ++-- .../irText/expressions/coercionToUnit.fir.txt | 4 +- .../ir/irText/expressions/elvis.fir.txt | 22 +++---- .../comparableWithDoubleOrFloat.fir.txt | 8 ++- ...eqRhsConditionPossiblyAffectingLhs.fir.txt | 6 +- .../floatingPointCompareTo.fir.txt | 40 ++++++++----- .../floatingPointEqeq.fir.txt | 20 +++---- .../floatingPointEquals.fir.txt | 24 ++++---- .../floatingPointExcleq.fir.txt | 20 +++---- .../floatingPointLess.fir.txt | 20 +++++-- .../nullableAnyAsIntToDouble.fir.txt | 2 +- .../nullableFloatingPointEqeq.fir.txt | 8 +-- ...meterWithPrimitiveNumericSupertype.fir.txt | 16 ++--- .../whenByFloatingPoint.fir.txt | 18 +++--- ...mplicitCastInReturnFromConstructor.fir.txt | 2 +- .../expressions/implicitCastToNonNull.fir.txt | 34 +++++------ .../implicitCastToTypeParameter.fir.txt | 5 +- .../ir/irText/expressions/kt23030.fir.txt | 8 +-- .../ir/irText/expressions/kt30020.fir.txt | 51 ++++++++-------- .../ir/irText/expressions/kt30796.fir.txt | 58 +++++++++---------- .../safeCallWithIncrementDecrement.fir.txt | 2 +- .../ir/irText/expressions/safeCalls.fir.txt | 20 +++---- ...ConversionInGenericConstructorCall.fir.txt | 2 +- ...versionInGenericConstructorCall_NI.fir.txt | 2 +- .../sam/samConversionToGeneric.fir.txt | 8 +-- .../sam/samConversionsWithSmartCasts.fir.txt | 46 ++++++++------- .../setFieldWithImplicitCast.fir.txt | 2 +- .../ir/irText/expressions/smartCasts.fir.txt | 22 +++---- .../smartCastsWithDestructuring.fir.txt | 11 ++-- .../temporaryInEnumEntryInitializer.fir.txt | 2 +- .../expressions/temporaryInInitBlock.fir.txt | 2 +- .../ir/irText/expressions/throw.fir.txt | 2 +- .../irText/expressions/typeArguments.fir.txt | 3 +- .../varargWithImplicitCast.fir.txt | 8 +-- .../variableAsFunctionCall.fir.txt | 8 +-- .../ir/irText/expressions/when.fir.txt | 8 +-- .../whenWithSubjectVariable.fir.txt | 10 ++-- .../irText/expressions/whileDoWhile.fir.txt | 2 +- .../genericPropertyReferenceType.fir.txt | 2 +- ...rtCastOnFieldReceiverOfGenericType.fir.txt | 7 ++- .../smartCastOnReceiverOfGenericType.fir.txt | 18 +++--- 48 files changed, 332 insertions(+), 301 deletions(-) diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.txt b/compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.txt index a739cde972b..077f1c780d6 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.txt @@ -5,7 +5,7 @@ FILE: nullability.kt Int(42) } else -> { - R|/|! + R|/| } } @@ -16,7 +16,7 @@ FILE: nullability.kt throw KotlinNullPointerException#() } else -> { - R|/|! + R|/| } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/factoryFunctionOverloads.txt b/compiler/fir/resolve/testData/resolve/stdlib/factoryFunctionOverloads.txt index b6b9defbd83..961eed0460f 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/factoryFunctionOverloads.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/factoryFunctionOverloads.txt @@ -12,7 +12,7 @@ FILE: factoryFunctionOverloads.kt throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|() } else -> { - R|/|! + R|/| } } , R|/flag|) diff --git a/compiler/fir/resolve/testData/resolve/stdlib/hashSet.txt b/compiler/fir/resolve/testData/resolve/stdlib/hashSet.txt index 1a5a93b2ff4..618dacdc50f 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/hashSet.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/hashSet.txt @@ -23,7 +23,7 @@ FILE: hashSet.kt throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|() } else -> { - R|/|! + R|/| } } .R|/d| = R|/produce|() diff --git a/compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.txt b/compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.txt index 1cac6c9ed6c..fe0692011f8 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.txt @@ -1,10 +1,10 @@ FILE: typeParameterDerived.kt public final inline fun R|kotlin/collections/MutableMap|.getOrPut(key: R|K|, defaultValue: R|kotlin/Function1|, postCompute: R|kotlin/Function1|): R|V| { - lval value: R|V| = R|FakeOverride|(R|/key|) + lval value: R|V| = this@R|kotlin/collections/Map|.R|FakeOverride|(R|/key|) ^getOrPut when () { ==(R|/value|, Null(null)) -> { lval answer: R|VA| = R|/defaultValue|.R|FakeOverride|(R|/key|) - R|FakeOverride|(R|/key|, R|/answer|) + this@R|kotlin/collections/MutableMap|.R|FakeOverride|(R|/key|, R|/answer|) R|/postCompute|.R|FakeOverride|(R|/answer|) R|/answer| } diff --git a/compiler/fir/resolve/testData/resolve/whenAsReceiver.txt b/compiler/fir/resolve/testData/resolve/whenAsReceiver.txt index f79f2abf9cf..b49c188268f 100644 --- a/compiler/fir/resolve/testData/resolve/whenAsReceiver.txt +++ b/compiler/fir/resolve/testData/resolve/whenAsReceiver.txt @@ -5,7 +5,7 @@ FILE: whenAsReceiver.kt throw #() } else -> { - R|/|! + R|/| } } diff --git a/compiler/testData/ir/irText/expressions/bangbang.fir.txt b/compiler/testData/ir/irText/expressions/bangbang.fir.txt index e2f45f22fe3..0ba9f82bc71 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.fir.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.fir.txt @@ -15,34 +15,34 @@ FILE fqName: fileName:/bangbang.kt ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test1' type=kotlin.Any? origin=null + then: GET_VAR 'val : kotlin.Any? [val] declared in .test1' type=kotlin.Any origin=null FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Int VALUE_PARAMETER name:a index:0 type:kotlin.Any? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any?): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=EXCLEXCL - VAR name: type:kotlin.Int [val] - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + VAR name: type:kotlin.Int? [val] + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int? origin=null $this: GET_VAR 'a: kotlin.Any? declared in .test2' type=kotlin.Any? origin=null WHEN type=kotlin.Int origin=EXCLEXCL 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 : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + arg0: GET_VAR 'val : kotlin.Int? [val] declared in .test2' type=kotlin.Int? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null - FUN name:test3 visibility:public modality:FINAL (a:X of .test3) returnType:X of .test3 + then: GET_VAR 'val : kotlin.Int? [val] declared in .test2' type=kotlin.Int origin=null + FUN name:test3 visibility:public modality:FINAL (a:X of .test3) returnType:kotlin.Any TYPE_PARAMETER name:X index:0 variance: superTypes:[] VALUE_PARAMETER name:a index:0 type:X of .test3 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (a: X of .test3): X of .test3 declared in ' - BLOCK type=X of .test3 origin=EXCLEXCL + RETURN type=kotlin.Nothing from='public final fun test3 (a: X of .test3): kotlin.Any declared in ' + BLOCK type=kotlin.Any origin=EXCLEXCL VAR name: type:X of .test3 [val] GET_VAR 'a: X of .test3 declared in .test3' type=X of .test3 origin=null - WHEN type=X of .test3 origin=EXCLEXCL + WHEN type=kotlin.Any origin=EXCLEXCL 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 : X of .test3 [val] declared in .test3' type=X of .test3 origin=null @@ -51,7 +51,7 @@ FILE fqName: fileName:/bangbang.kt ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : X of .test3 [val] declared in .test3' type=X of .test3 origin=null + then: GET_VAR 'val : X of .test3 [val] declared in .test3' type=kotlin.Any origin=null FUN name:useString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit VALUE_PARAMETER name:s index:0 type:kotlin.String BLOCK_BODY @@ -63,34 +63,34 @@ FILE fqName: fileName:/bangbang.kt 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 - then: BLOCK type=X of .test4 origin=EXCLEXCL - VAR name: type:X of .test4 [val] - GET_VAR 'a: X of .test4 declared in .test4' type=X of .test4 origin=null - WHEN type=X of .test4 origin=EXCLEXCL + then: BLOCK type=kotlin.String origin=EXCLEXCL + VAR name: type:kotlin.String? [val] + GET_VAR 'a: X of .test4 declared in .test4' type=kotlin.String? origin=null + WHEN type=kotlin.String origin=EXCLEXCL 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 : X of .test4 [val] declared in .test4' type=X of .test4 origin=null + arg0: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : X of .test4 [val] declared in .test4' type=X of .test4 origin=null - WHEN type=IrErrorType origin=IF + then: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String origin=null + 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 - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - BLOCK type=X of .test4 origin=EXCLEXCL - VAR name: type:X of .test4 [val] - GET_VAR 'a: X of .test4 declared in .test4' type=X of .test4 origin=null - WHEN type=X of .test4 origin=EXCLEXCL + then: CALL 'public final fun useString (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + s: BLOCK type=kotlin.String origin=EXCLEXCL + VAR name: type:kotlin.String? [val] + GET_VAR 'a: X of .test4 declared in .test4' type=kotlin.String? origin=null + WHEN type=kotlin.String origin=EXCLEXCL 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 : X of .test4 [val] declared in .test4' type=X of .test4 origin=null + arg0: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : X of .test4 [val] declared in .test4' type=X of .test4 origin=null + then: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt index 128af64c846..8f60da1416a 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt @@ -17,7 +17,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt then: BREAK label=null loop.label=L BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Boolean? [val] declared in .test1' type=kotlin.Boolean? origin=null + then: GET_VAR 'val : kotlin.Boolean? [val] declared in .test1' type=kotlin.Boolean origin=null body: BLOCK type=kotlin.Unit origin=null FUN name:test2 visibility:public modality:FINAL <> (c:kotlin.Boolean?) returnType:kotlin.Unit VALUE_PARAMETER name:c index:0 type:kotlin.Boolean? @@ -37,7 +37,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt then: CONTINUE label=null loop.label=L BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Boolean? [val] declared in .test2' type=kotlin.Boolean? origin=null + then: GET_VAR 'val : kotlin.Boolean? [val] declared in .test2' type=kotlin.Boolean origin=null body: BLOCK type=kotlin.Unit origin=null FUN name:test3 visibility:public modality:FINAL <> (ss:kotlin.collections.List?) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List? @@ -57,7 +57,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt then: CONTINUE label=null loop.label=L BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.collections.List? [val] declared in .test3' type=kotlin.collections.List? origin=null + then: GET_VAR 'val : kotlin.collections.List? [val] declared in .test3' type=kotlin.collections.List origin=null VAR name: type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null $this: GET_VAR 'val : kotlin.collections.List [val] declared in .test3' type=kotlin.collections.List origin=null @@ -86,7 +86,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt then: BREAK label=null loop.label=L BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.collections.List? [val] declared in .test4' type=kotlin.collections.List? origin=null + then: GET_VAR 'val : kotlin.collections.List? [val] declared in .test4' type=kotlin.collections.List origin=null VAR name: type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null $this: GET_VAR 'val : kotlin.collections.List [val] declared in .test4' type=kotlin.collections.List origin=null diff --git a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.fir.txt b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.fir.txt index 5be2d34b4a2..6b5a8eb8e13 100644 --- a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.fir.txt +++ b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.fir.txt @@ -28,12 +28,12 @@ FILE fqName: fileName:/chainOfSafeCalls.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:test visibility:public modality:FINAL <> (nc:.C?) returnType:.C + FUN name:test visibility:public modality:FINAL <> (nc:.C?) returnType:.C? VALUE_PARAMETER name:nc index:0 type:.C? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test (nc: .C?): .C declared in ' - CALL 'public final fun foo (): .C declared in .C' type=.C origin=null - $this: CALL 'public final fun foo (): .C declared in .C' type=.C origin=null + RETURN type=kotlin.Nothing from='public final fun test (nc: .C?): .C? declared in ' + CALL 'public final fun foo (): .C declared in .C' type=.C? origin=null + $this: CALL 'public final fun foo (): .C declared in .C' type=.C? origin=null $this: CALL 'public final fun bar (): .C? declared in .C' type=.C? origin=null - $this: CALL 'public final fun foo (): .C declared in .C' type=.C origin=null + $this: CALL 'public final fun foo (): .C declared in .C' type=.C? origin=null $this: GET_VAR 'nc: .C? declared in .test' type=.C? origin=null diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt index 6fc6ac326d5..1e5137aeaea 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt @@ -19,9 +19,9 @@ FILE fqName: fileName:/coercionToUnit.kt element: CONST String type=kotlin.String value="" FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit? origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY x: CONST String type=kotlin.String value="Hello," - CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit? origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY x: CONST String type=kotlin.String value="world!" diff --git a/compiler/testData/ir/irText/expressions/elvis.fir.txt b/compiler/testData/ir/irText/expressions/elvis.fir.txt index 5f3d29829ee..e916d3367da 100644 --- a/compiler/testData/ir/irText/expressions/elvis.fir.txt +++ b/compiler/testData/ir/irText/expressions/elvis.fir.txt @@ -28,7 +28,7 @@ FILE fqName: fileName:/elvis.kt then: GET_VAR 'b: kotlin.Any declared in .test1' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test1' type=kotlin.Any? origin=null + then: GET_VAR 'val : kotlin.Any? [val] declared in .test1' type=kotlin.Any origin=null FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.String?, b:kotlin.Any) returnType:kotlin.Any VALUE_PARAMETER name:a index:0 type:kotlin.String? VALUE_PARAMETER name:b index:1 type:kotlin.Any @@ -45,7 +45,7 @@ FILE fqName: fileName:/elvis.kt then: GET_VAR 'b: kotlin.Any declared in .test2' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.String? [val] declared in .test2' type=kotlin.String? origin=null + then: GET_VAR 'val : kotlin.String? [val] declared in .test2' type=kotlin.String origin=null FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any?, b:kotlin.Any?) returnType:kotlin.String VALUE_PARAMETER name:a index:0 type:kotlin.Any? VALUE_PARAMETER name:b index:1 type:kotlin.Any? @@ -63,18 +63,18 @@ FILE fqName: fileName:/elvis.kt 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="" RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in ' - BLOCK type=kotlin.Any? origin=ELVIS - VAR name: type:kotlin.Any? [val] - GET_VAR 'a: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null - WHEN type=kotlin.Any? origin=ELVIS + BLOCK type=kotlin.String origin=ELVIS + VAR name: type:kotlin.String? [val] + GET_VAR 'a: kotlin.Any? declared in .test3' type=kotlin.String? origin=null + WHEN type=kotlin.String origin=ELVIS 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 : kotlin.Any? [val] declared in .test3' type=kotlin.Any? origin=null + arg0: GET_VAR 'val : kotlin.String? [val] declared in .test3' type=kotlin.String? origin=null arg1: CONST Null type=kotlin.Nothing? value=null - then: GET_VAR 'b: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null + then: GET_VAR 'b: kotlin.Any? declared in .test3' type=kotlin.String origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test3' type=kotlin.Any? origin=null + then: GET_VAR 'val : kotlin.String? [val] declared in .test3' type=kotlin.String origin=null FUN name:test4 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY @@ -90,7 +90,7 @@ FILE fqName: fileName:/elvis.kt then: GET_VAR 'x: kotlin.Any declared in .test4' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test4' type=kotlin.Any? origin=null + then: GET_VAR 'val : kotlin.Any? [val] declared in .test4' type=kotlin.Any origin=null FUN name:test5 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY @@ -106,4 +106,4 @@ FILE fqName: fileName:/elvis.kt then: GET_VAR 'x: kotlin.Any declared in .test5' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test5' type=kotlin.Any? origin=null + then: GET_VAR 'val : kotlin.Any? [val] declared in .test5' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.fir.txt index e7fee32f93d..25e37df097b 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.fir.txt @@ -15,7 +15,9 @@ FILE fqName: fileName:/comparableWithDoubleOrFloat.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Comparable' type=kotlin.Boolean + then: CALL 'public final fun less (arg0: kotlin.Double, arg1: kotlin.Double): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT + arg0: GET_VAR 'x: kotlin.Comparable declared in .testD' type=kotlin.Double origin=null + arg1: GET_VAR 'y: kotlin.Comparable declared in .testD' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -35,7 +37,9 @@ FILE fqName: fileName:/comparableWithDoubleOrFloat.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Comparable' type=kotlin.Boolean + then: CALL 'public final fun less (arg0: kotlin.Float, arg1: kotlin.Float): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT + arg0: GET_VAR 'x: kotlin.Comparable declared in .testF' type=kotlin.Float origin=null + arg1: GET_VAR 'y: kotlin.Comparable declared in .testF' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt index c0e37aba351..dbd07010078 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt @@ -5,7 +5,7 @@ FILE fqName: fileName:/eqeqRhsConditionPossiblyAffectingLhs.kt RETURN type=kotlin.Nothing from='public final fun test (x: kotlin.Any): kotlin.Boolean declared in ' 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 'x: kotlin.Any declared in .test' type=kotlin.Any origin=null - arg1: WHEN type=kotlin.Any origin=IF + arg1: WHEN type=kotlin.Double origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test' type=kotlin.Any origin=null @@ -21,7 +21,7 @@ FILE fqName: fileName:/eqeqRhsConditionPossiblyAffectingLhs.kt ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Nothing? [val] declared in .test' type=kotlin.Nothing? origin=null + then: GET_VAR 'val : kotlin.Nothing? [val] declared in .test' type=kotlin.Nothing origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'x: kotlin.Any declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'x: kotlin.Any declared in .test' type=kotlin.Double origin=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt index 65db185b15c..b49f86f05c4 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt @@ -17,8 +17,9 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test2d' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'y: kotlin.Any declared in .test2d' type=kotlin.Any origin=null + arg0: CALL 'public open fun compareTo (other: kotlin.Double): kotlin.Int declared in kotlin.Double' type=kotlin.Int origin=null + $this: GET_VAR 'x: kotlin.Double declared in .test2d' type=kotlin.Double origin=null + other: GET_VAR 'y: kotlin.Any declared in .test2d' type=kotlin.Double origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -40,8 +41,9 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'y: kotlin.Any declared in .test3d' type=kotlin.Any origin=null + arg0: CALL 'public open fun compareTo (other: kotlin.Double): kotlin.Int declared in kotlin.Double' type=kotlin.Int origin=null + $this: GET_VAR 'x: kotlin.Any declared in .test3d' type=kotlin.Double origin=null + other: GET_VAR 'y: kotlin.Any declared in .test3d' type=kotlin.Double origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -64,8 +66,9 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test2f' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'y: kotlin.Any declared in .test2f' type=kotlin.Any origin=null + arg0: CALL 'public open fun compareTo (other: kotlin.Float): kotlin.Int declared in kotlin.Float' type=kotlin.Int origin=null + $this: GET_VAR 'x: kotlin.Float declared in .test2f' type=kotlin.Float origin=null + other: GET_VAR 'y: kotlin.Any declared in .test2f' type=kotlin.Float origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -87,8 +90,9 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'y: kotlin.Any declared in .test3f' type=kotlin.Any origin=null + arg0: CALL 'public open fun compareTo (other: kotlin.Float): kotlin.Int declared in kotlin.Float' type=kotlin.Int origin=null + $this: GET_VAR 'x: kotlin.Any declared in .test3f' type=kotlin.Float origin=null + other: GET_VAR 'y: kotlin.Any declared in .test3f' type=kotlin.Float origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -110,8 +114,9 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'y: kotlin.Any declared in .testFD' type=kotlin.Any origin=null + arg0: CALL 'public final fun compareTo (other: kotlin.Double): kotlin.Int declared in kotlin.Float' type=kotlin.Int origin=null + $this: GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Float origin=null + other: GET_VAR 'y: kotlin.Any declared in .testFD' type=kotlin.Double origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -133,8 +138,9 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'y: kotlin.Any declared in .testDF' type=kotlin.Any origin=null + arg0: CALL 'public final fun compareTo (other: kotlin.Float): kotlin.Int declared in kotlin.Double' type=kotlin.Int origin=null + $this: GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Double origin=null + other: GET_VAR 'y: kotlin.Any declared in .testDF' type=kotlin.Float origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -157,8 +163,9 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test2fr' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Any declared in .test2fr' type=kotlin.Any origin=null + arg0: CALL 'public open fun compareTo (other: kotlin.Float): kotlin.Int declared in kotlin.Float' type=kotlin.Int origin=null + $this: GET_VAR ': kotlin.Float declared in kotlin.Float' type=kotlin.Float origin=null + other: GET_VAR 'x: kotlin.Any declared in .test2fr' type=kotlin.Float origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -173,8 +180,9 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null + arg0: CALL 'public final fun compareTo (other: kotlin.Double): kotlin.Int declared in kotlin.Float' type=kotlin.Int origin=null + $this: GET_VAR ': kotlin.Float declared in kotlin.Float' type=kotlin.Float origin=null + other: GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Double origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEqeq.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEqeq.fir.txt index 2cce99e9c1e..8981be73e3b 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEqeq.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEqeq.fir.txt @@ -42,7 +42,7 @@ FILE fqName: fileName:/floatingPointEqeq.kt GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null then: 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 'x: kotlin.Double declared in .test5d' type=kotlin.Double origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -63,8 +63,8 @@ FILE fqName: fileName:/floatingPointEqeq.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: 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 'x: kotlin.Any declared in .test6d' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .test6d' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test6d' type=kotlin.Double origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test6d' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -111,7 +111,7 @@ FILE fqName: fileName:/floatingPointEqeq.kt GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null then: 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 'x: kotlin.Float declared in .test5f' type=kotlin.Float origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -132,8 +132,8 @@ FILE fqName: fileName:/floatingPointEqeq.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: 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 'x: kotlin.Any declared in .test6f' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .test6f' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test6f' type=kotlin.Float origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test6f' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -154,8 +154,8 @@ FILE fqName: fileName:/floatingPointEqeq.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: 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 'x: kotlin.Any declared in .testFD' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .testFD' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Float origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .testFD' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -176,8 +176,8 @@ FILE fqName: fileName:/floatingPointEqeq.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: 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 'x: kotlin.Any declared in .testDF' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .testDF' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Double origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .testDF' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt index 9b3a6010c6a..35a1bbb22d9 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt @@ -42,7 +42,7 @@ FILE fqName: fileName:/floatingPointEquals.kt GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test5d' type=kotlin.Double origin=null - other: GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null + other: GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -63,8 +63,8 @@ FILE fqName: fileName:/floatingPointEquals.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR 'x: kotlin.Any declared in .test6d' type=kotlin.Any origin=null - other: GET_VAR 'y: kotlin.Any declared in .test6d' type=kotlin.Any origin=null + $this: GET_VAR 'x: kotlin.Any declared in .test6d' type=kotlin.Double origin=null + other: GET_VAR 'y: kotlin.Any declared in .test6d' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -111,7 +111,7 @@ FILE fqName: fileName:/floatingPointEquals.kt GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test5f' type=kotlin.Float origin=null - other: GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null + other: GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -132,8 +132,8 @@ FILE fqName: fileName:/floatingPointEquals.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR 'x: kotlin.Any declared in .test6f' type=kotlin.Any origin=null - other: GET_VAR 'y: kotlin.Any declared in .test6f' type=kotlin.Any origin=null + $this: GET_VAR 'x: kotlin.Any declared in .test6f' type=kotlin.Float origin=null + other: GET_VAR 'y: kotlin.Any declared in .test6f' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -154,8 +154,8 @@ FILE fqName: fileName:/floatingPointEquals.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Any origin=null - other: GET_VAR 'y: kotlin.Any declared in .testFD' type=kotlin.Any origin=null + $this: GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Float origin=null + other: GET_VAR 'y: kotlin.Any declared in .testFD' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -176,8 +176,8 @@ FILE fqName: fileName:/floatingPointEquals.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Any origin=null - other: GET_VAR 'y: kotlin.Any declared in .testDF' type=kotlin.Any origin=null + $this: GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Double origin=null + other: GET_VAR 'y: kotlin.Any declared in .testDF' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -224,7 +224,7 @@ FILE fqName: fileName:/floatingPointEquals.kt GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Any declared in kotlin.Any' type=kotlin.Any origin=null - other: GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null + other: GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -239,7 +239,7 @@ FILE fqName: fileName:/floatingPointEquals.kt GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Any declared in kotlin.Any' type=kotlin.Any origin=null - other: GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null + other: GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointExcleq.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointExcleq.fir.txt index cc344f3852f..e245b00258b 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointExcleq.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointExcleq.fir.txt @@ -47,7 +47,7 @@ FILE fqName: fileName:/floatingPointExcleq.kt then: 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 arg0: GET_VAR 'x: kotlin.Double declared in .test5d' type=kotlin.Double origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -69,8 +69,8 @@ FILE fqName: fileName:/floatingPointExcleq.kt then: CONST Boolean type=kotlin.Boolean value=false then: 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 - arg0: GET_VAR 'x: kotlin.Any declared in .test6d' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .test6d' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test6d' type=kotlin.Double origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test6d' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -122,7 +122,7 @@ FILE fqName: fileName:/floatingPointExcleq.kt then: 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 arg0: GET_VAR 'x: kotlin.Float declared in .test5f' type=kotlin.Float origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -144,8 +144,8 @@ FILE fqName: fileName:/floatingPointExcleq.kt then: CONST Boolean type=kotlin.Boolean value=false then: 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 - arg0: GET_VAR 'x: kotlin.Any declared in .test6f' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .test6f' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test6f' type=kotlin.Float origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test6f' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -167,8 +167,8 @@ FILE fqName: fileName:/floatingPointExcleq.kt then: CONST Boolean type=kotlin.Boolean value=false then: 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 - arg0: GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .testFD' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Float origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .testFD' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -190,8 +190,8 @@ FILE fqName: fileName:/floatingPointExcleq.kt then: CONST Boolean type=kotlin.Boolean value=false then: 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 - arg0: GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .testDF' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Double origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .testDF' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointLess.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointLess.fir.txt index 447460b2bfa..666bc7f0883 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointLess.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointLess.fir.txt @@ -16,7 +16,9 @@ FILE fqName: fileName:/floatingPointLess.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test2d' type=kotlin.Any origin=null - then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Double, kotlin/Any' type=kotlin.Boolean + then: CALL 'public final fun less (arg0: kotlin.Double, arg1: kotlin.Double): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT + arg0: GET_VAR 'x: kotlin.Double declared in .test2d' type=kotlin.Double origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test2d' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -36,7 +38,9 @@ FILE fqName: fileName:/floatingPointLess.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Any' type=kotlin.Boolean + then: CALL 'public final fun less (arg0: kotlin.Double, arg1: kotlin.Double): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT + arg0: GET_VAR 'x: kotlin.Any declared in .test3d' type=kotlin.Double origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test3d' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -57,7 +61,9 @@ FILE fqName: fileName:/floatingPointLess.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test2f' type=kotlin.Any origin=null - then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Float, kotlin/Any' type=kotlin.Boolean + then: CALL 'public final fun less (arg0: kotlin.Float, arg1: kotlin.Float): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT + arg0: GET_VAR 'x: kotlin.Float declared in .test2f' type=kotlin.Float origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test2f' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -77,7 +83,9 @@ FILE fqName: fileName:/floatingPointLess.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Any' type=kotlin.Boolean + then: CALL 'public final fun less (arg0: kotlin.Float, arg1: kotlin.Float): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT + arg0: GET_VAR 'x: kotlin.Any declared in .test3f' type=kotlin.Float origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .test3f' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -97,7 +105,7 @@ FILE fqName: fileName:/floatingPointLess.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Any' type=kotlin.Boolean + then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Float, kotlin/Double' type=kotlin.Boolean BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -117,7 +125,7 @@ FILE fqName: fileName:/floatingPointLess.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Any' type=kotlin.Boolean + then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Double, kotlin/Float' type=kotlin.Boolean BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableAnyAsIntToDouble.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableAnyAsIntToDouble.fir.txt index 5009c29dbce..fafc14f76f5 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableAnyAsIntToDouble.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableAnyAsIntToDouble.fir.txt @@ -8,7 +8,7 @@ FILE fqName: fileName:/nullableAnyAsIntToDouble.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any? origin=null - then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Any?, kotlin/Double' type=kotlin.Boolean + then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Int, kotlin/Double' type=kotlin.Boolean BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.fir.txt index ed8974b496d..fdb10bc7c55 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.fir.txt @@ -18,7 +18,7 @@ FILE fqName: fileName:/nullableFloatingPointEqeq.kt GET_VAR 'y: kotlin.Any? declared in .testDF' type=kotlin.Any? origin=null then: 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 'x: kotlin.Double? declared in .testDF' type=kotlin.Double? origin=null - arg1: GET_VAR 'y: kotlin.Any? declared in .testDF' type=kotlin.Any? origin=null + arg1: GET_VAR 'y: kotlin.Any? declared in .testDF' type=kotlin.Float? origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -33,7 +33,7 @@ FILE fqName: fileName:/nullableFloatingPointEqeq.kt GET_VAR 'y: kotlin.Any? declared in .testDI' type=kotlin.Any? origin=null then: 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 'x: kotlin.Double? declared in .testDI' type=kotlin.Double? origin=null - arg1: GET_VAR 'y: kotlin.Any? declared in .testDI' type=kotlin.Any? origin=null + arg1: GET_VAR 'y: kotlin.Any? declared in .testDI' type=kotlin.Int? origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -54,8 +54,8 @@ FILE fqName: fileName:/nullableFloatingPointEqeq.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: 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 'x: kotlin.Any? declared in .testDI2' type=kotlin.Any? origin=null - arg1: GET_VAR 'y: kotlin.Any? declared in .testDI2' type=kotlin.Any? origin=null + arg0: GET_VAR 'x: kotlin.Any? declared in .testDI2' type=kotlin.Int? origin=null + arg1: GET_VAR 'y: kotlin.Any? declared in .testDI2' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/typeParameterWithPrimitiveNumericSupertype.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/typeParameterWithPrimitiveNumericSupertype.fir.txt index 9f9cc253e83..4895d76c703 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/typeParameterWithPrimitiveNumericSupertype.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/typeParameterWithPrimitiveNumericSupertype.fir.txt @@ -10,7 +10,7 @@ FILE fqName: fileName:/typeParameterWithPrimitiveNumericSupertype.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int GET_VAR 'x: kotlin.Any declared in .test0' type=kotlin.Any origin=null then: 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 'x: kotlin.Any declared in .test0' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test0' type=kotlin.Int origin=null arg1: GET_VAR 'y: T of .test0 declared in .test0' type=T of .test0 origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -26,7 +26,7 @@ FILE fqName: fileName:/typeParameterWithPrimitiveNumericSupertype.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.Any origin=null then: 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 'x: kotlin.Any declared in .test1' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.Float origin=null arg1: GET_VAR 'y: T of .test1 declared in .test1' type=T of .test1 origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -42,7 +42,7 @@ FILE fqName: fileName:/typeParameterWithPrimitiveNumericSupertype.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Any origin=null then: 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 'x: kotlin.Any declared in .test2' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Float origin=null arg1: GET_VAR 'y: T of .test2 declared in .test2' type=T of .test2 origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -58,7 +58,7 @@ FILE fqName: fileName:/typeParameterWithPrimitiveNumericSupertype.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.Any origin=null then: 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 'x: kotlin.Any declared in .test3' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.Int origin=null arg1: GET_VAR 'y: T of .test3 declared in .test3' type=T of .test3 origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -74,7 +74,7 @@ FILE fqName: fileName:/typeParameterWithPrimitiveNumericSupertype.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int GET_VAR 'x: kotlin.Any declared in .test4' type=kotlin.Any origin=null then: 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 'x: kotlin.Any declared in .test4' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test4' type=kotlin.Int origin=null arg1: GET_VAR 'y: T of .test4 declared in .test4' type=T of .test4 origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -91,7 +91,7 @@ FILE fqName: fileName:/typeParameterWithPrimitiveNumericSupertype.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int GET_VAR 'x: kotlin.Any declared in .test5' type=kotlin.Any origin=null then: 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 'x: kotlin.Any declared in .test5' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test5' type=kotlin.Int origin=null arg1: GET_VAR 'y: R of .test5 declared in .test5' type=R of .test5 origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -107,7 +107,7 @@ FILE fqName: fileName:/typeParameterWithPrimitiveNumericSupertype.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int GET_VAR 'x: kotlin.Any declared in .test6' type=kotlin.Any origin=null then: 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 'x: kotlin.Any declared in .test6' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .test6' type=kotlin.Int origin=null arg1: GET_VAR 'y: T of .test6 declared in .test6' type=T of .test6 origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -131,7 +131,7 @@ FILE fqName: fileName:/typeParameterWithPrimitiveNumericSupertype.kt GET_VAR 'y: kotlin.Any declared in .F.testCapturedType' type=kotlin.Any origin=null then: 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 'x: T of .F declared in .F.testCapturedType' type=T of .F origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .F.testCapturedType' type=kotlin.Any origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .F.testCapturedType' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt index bcdac9ce9bc..1b8f933ec20 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt @@ -26,11 +26,11 @@ FILE fqName: fileName:/whenByFloatingPoint.kt $this: CONST Int type=kotlin.Int value=1 RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenSubject (x: kotlin.Any): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp1_subject type:kotlin.Any [val] + VAR IR_TEMPORARY_VARIABLE name:tmp1_subject type:kotlin.Double [val] WHEN type=kotlin.Int 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.Any [val] declared in .testSmartCastInWhenSubject' type=kotlin.Any origin=null + arg0: GET_VAR 'val tmp1_subject: kotlin.Double [val] declared in .testSmartCastInWhenSubject' type=kotlin.Double origin=null arg1: CONST Double type=kotlin.Double value=0.0 then: CONST Int type=kotlin.Int value=0 BRANCH @@ -54,7 +54,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt 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.Double [val] declared in .testSmartCastInWhenCondition' type=kotlin.Double origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .testSmartCastInWhenCondition' type=kotlin.Any origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .testSmartCastInWhenCondition' type=kotlin.Double origin=null then: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -99,12 +99,12 @@ FILE fqName: fileName:/whenByFloatingPoint.kt $this: CONST Int type=kotlin.Int value=1 RETURN type=kotlin.Nothing from='public final fun testSmartCastToDifferentTypes (x: kotlin.Any, y: kotlin.Any): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp4_subject type:kotlin.Any [val] + VAR IR_TEMPORARY_VARIABLE name:tmp4_subject type:kotlin.Double [val] WHEN type=kotlin.Int 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 tmp4_subject: kotlin.Any [val] declared in .testSmartCastToDifferentTypes' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .testSmartCastToDifferentTypes' type=kotlin.Any origin=null + arg0: GET_VAR 'val tmp4_subject: kotlin.Double [val] declared in .testSmartCastToDifferentTypes' type=kotlin.Double origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .testSmartCastToDifferentTypes' type=kotlin.Float origin=null then: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -124,8 +124,8 @@ FILE fqName: fileName:/whenByFloatingPoint.kt 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 tmp5_subject: kotlin.Any [val] declared in .testWithPrematureExitInConditionSubexpression' type=kotlin.Any origin=null - arg1: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - WHEN type=kotlin.Any origin=IF + arg1: CALL 'public final fun foo (x: kotlin.Double): kotlin.Double declared in ' type=kotlin.Double origin=null + x: WHEN type=kotlin.Double origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testWithPrematureExitInConditionSubexpression' type=kotlin.Any origin=null @@ -133,7 +133,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'x: kotlin.Any declared in .testWithPrematureExitInConditionSubexpression' type=kotlin.Any origin=null + then: GET_VAR 'x: kotlin.Any declared in .testWithPrematureExitInConditionSubexpression' type=kotlin.Double origin=null then: CONST Int type=kotlin.Int value=0 BRANCH if: 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 8d7b1c83f83..e69cf46dc11 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastInReturnFromConstructor.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastInReturnFromConstructor.fir.txt @@ -13,7 +13,7 @@ FILE fqName: fileName:/implicitCastInReturnFromConstructor.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Unit GET_VAR 'x: kotlin.Any? declared in .C.' type=kotlin.Any? origin=null then: RETURN type=kotlin.Nothing from='public final fun (x: kotlin.Any?): .C declared in .C' - GET_VAR 'x: kotlin.Any? declared in .C.' type=kotlin.Any? origin=null + GET_VAR 'x: kotlin.Any? declared in .C.' type=kotlin.Unit origin=null DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .C' FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt index 96d5cb18093..3760f3e9dd0 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt @@ -1,9 +1,9 @@ FILE fqName: fileName:/implicitCastToNonNull.kt - FUN name:test1 visibility:public modality:FINAL <> (x:kotlin.String?) returnType:IrErrorType + FUN name:test1 visibility:public modality:FINAL <> (x:kotlin.String?) returnType:kotlin.Int VALUE_PARAMETER name:x index:0 type:kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (x: kotlin.String?): IrErrorType declared in ' - WHEN type=IrErrorType origin=IF + RETURN type=kotlin.Nothing from='public final fun test1 (x: kotlin.String?): kotlin.Int declared in ' + WHEN type=kotlin.Int 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 'x: kotlin.String? declared in .test1' type=kotlin.String? origin=null @@ -11,13 +11,13 @@ FILE fqName: fileName:/implicitCastToNonNull.kt then: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - FUN name:test2 visibility:public modality:FINAL (x:T of .test2) returnType:IrErrorType + then: ERROR_CALL 'No getter found for R|kotlin/String.length|' type=kotlin.Int + FUN name:test2 visibility:public modality:FINAL (x:T of .test2) returnType:kotlin.Int TYPE_PARAMETER name:T index:0 variance: superTypes:[] VALUE_PARAMETER name:x index:0 type:T of .test2 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (x: T of .test2): IrErrorType declared in ' - WHEN type=IrErrorType origin=IF + RETURN type=kotlin.Nothing from='public final fun test2 (x: T of .test2): kotlin.Int declared in ' + WHEN type=kotlin.Int 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 'x: T of .test2 declared in .test2' type=T of .test2 origin=null @@ -25,33 +25,33 @@ FILE fqName: fileName:/implicitCastToNonNull.kt then: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - FUN name:test3 visibility:public modality:FINAL (x:kotlin.Any) returnType:IrErrorType [inline] + then: ERROR_CALL 'No getter found for R|kotlin/CharSequence.length|' type=kotlin.Int + FUN name:test3 visibility:public modality:FINAL (x:kotlin.Any) returnType:kotlin.Int [inline] TYPE_PARAMETER name:T index:0 variance: superTypes:[] VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Any): IrErrorType [inline] declared in ' - WHEN type=IrErrorType origin=IF + RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Any): kotlin.Int [inline] declared in ' + WHEN type=kotlin.Int origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=T of .test3 GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.Any origin=null then: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - FUN name:test4 visibility:public modality:FINAL (x:kotlin.Any?) returnType:IrErrorType [inline] + then: ERROR_CALL 'No getter found for R|kotlin/CharSequence.length|' type=kotlin.Int + FUN name:test4 visibility:public modality:FINAL (x:kotlin.Any?) returnType:kotlin.Int [inline] TYPE_PARAMETER name:T index:0 variance: superTypes:[] VALUE_PARAMETER name:x index:0 type:kotlin.Any? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (x: kotlin.Any?): IrErrorType [inline] declared in ' - WHEN type=IrErrorType origin=IF + RETURN type=kotlin.Nothing from='public final fun test4 (x: kotlin.Any?): kotlin.Int [inline] declared in ' + WHEN type=kotlin.Int origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=T of .test4 GET_VAR 'x: kotlin.Any? declared in .test4' type=kotlin.Any? origin=null then: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType + then: ERROR_CALL 'No getter found for R|kotlin/CharSequence.length|' type=kotlin.Int FUN name:test5 visibility:public modality:FINAL (x:T of .test5, fn:kotlin.Function1.test5, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:T index:0 variance: superTypes:[] TYPE_PARAMETER name:S index:0 variance: superTypes:[] @@ -66,4 +66,4 @@ FILE fqName: fileName:/implicitCastToNonNull.kt arg1: CONST Null type=kotlin.Nothing? value=null then: CALL 'public abstract fun invoke (p1: S of .test5): kotlin.Unit declared in kotlin.Function1' type=kotlin.Unit origin=null $this: GET_VAR 'fn: kotlin.Function1.test5, kotlin.Unit> declared in .test5' type=kotlin.Function1.test5, kotlin.Unit> origin=null - p1: GET_VAR 'x: T of .test5 declared in .test5' type=T of .test5 origin=null + p1: GET_VAR 'x: T of .test5 declared in .test5' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt index 281b4715245..ade8f6d8b70 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt @@ -54,8 +54,9 @@ FILE fqName: fileName:/implicitCastToTypeParameter.kt BLOCK_BODY TYPE_OP type=T of .Bar origin=CAST typeOperand=T of .Bar GET_VAR 'arg: kotlin.Any declared in .Bar.test' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'arg: kotlin.Any declared in .Bar.test' type=kotlin.Any origin=null + CALL 'public final fun useT (t: T of .Bar): kotlin.Unit declared in .Bar' type=kotlin.Unit origin=null + $this: GET_VAR ': .Bar declared in .Bar' type=.Bar<*> origin=null + t: GET_VAR 'arg: kotlin.Any declared in .Bar.test' type=T of .Bar origin=null FUN name:useT visibility:public modality:FINAL <> ($this:.Bar, t:T of .Bar) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Bar VALUE_PARAMETER name:t index:0 type:T of .Bar diff --git a/compiler/testData/ir/irText/expressions/kt23030.fir.txt b/compiler/testData/ir/irText/expressions/kt23030.fir.txt index 90dc2bec217..095f224f226 100644 --- a/compiler/testData/ir/irText/expressions/kt23030.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt23030.fir.txt @@ -27,7 +27,7 @@ FILE fqName: fileName:/kt23030.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Any' type=kotlin.Boolean + then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Int, kotlin/Char' type=kotlin.Boolean BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -48,8 +48,8 @@ FILE fqName: fileName:/kt23030.kt if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false then: 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 'x: kotlin.Any declared in .testEqualsWithSmartCast' type=kotlin.Any origin=null - arg1: GET_VAR 'y: kotlin.Any declared in .testEqualsWithSmartCast' type=kotlin.Any origin=null + arg0: GET_VAR 'x: kotlin.Any declared in .testEqualsWithSmartCast' type=kotlin.Int origin=null + arg1: GET_VAR 'y: kotlin.Any declared in .testEqualsWithSmartCast' type=kotlin.Char origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false @@ -90,7 +90,7 @@ FILE fqName: fileName:/kt23030.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Any' type=kotlin.Boolean + then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Int, kotlin/Char' type=kotlin.Boolean BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index e9bc11d4673..4d37e41f14d 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -42,12 +42,29 @@ FILE fqName: fileName:/kt30020.kt $this: GET_VAR 'x: .X declared in .test' type=.X origin=null SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null CONST Int type=kotlin.collections.MutableList value=4 - VAR name: type:kotlin.collections.MutableList [val] - BLOCK type=kotlin.collections.MutableList origin=EXCLEXCL - VAR name: type:kotlin.collections.MutableList? [val] - CALL 'public abstract fun (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList? origin=null + VAR name: type:kotlin.collections.MutableList [val] + BLOCK type=kotlin.collections.MutableList origin=EXCLEXCL + VAR name: type:kotlin.collections.MutableList [val] + CALL 'public abstract fun (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null $this: GET_VAR 'nx: .X? declared in .test' type=.X? origin=null - WHEN type=kotlin.collections.MutableList origin=EXCLEXCL + WHEN type=kotlin.collections.MutableList origin=EXCLEXCL + 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 : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: THROW type=kotlin.Nothing + CONSTRUCTOR_CALL 'public constructor () declared in kotlin.KotlinNullPointerException' type=kotlin.KotlinNullPointerException origin=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: GET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + CONST Int type=kotlin.collections.MutableList value=5 + VAR name: type:kotlin.collections.MutableList [val] + BLOCK type=kotlin.collections.MutableList origin=EXCLEXCL + VAR name: type:kotlin.collections.MutableList? [val] + CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList? origin=null + $this: GET_VAR 'nx: .X? declared in .test' type=.X origin=null + WHEN type=kotlin.collections.MutableList origin=EXCLEXCL 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 : kotlin.collections.MutableList? [val] declared in .test' type=kotlin.collections.MutableList? origin=null @@ -56,26 +73,9 @@ FILE fqName: fileName:/kt30020.kt CONSTRUCTOR_CALL 'public constructor () declared in kotlin.KotlinNullPointerException' type=kotlin.KotlinNullPointerException origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.collections.MutableList? [val] declared in .test' type=kotlin.collections.MutableList? origin=null - SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null - CONST Int type=kotlin.collections.MutableList value=5 - VAR name: type:kotlin.collections.MutableList [val] - BLOCK type=kotlin.collections.MutableList origin=EXCLEXCL - VAR name: type:kotlin.collections.MutableList [val] - CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null - $this: GET_VAR 'nx: .X? declared in .test' type=.X? origin=null - WHEN type=kotlin.collections.MutableList origin=EXCLEXCL - 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 : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: THROW type=kotlin.Nothing - CONSTRUCTOR_CALL 'public constructor () declared in kotlin.KotlinNullPointerException' type=kotlin.KotlinNullPointerException origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null - SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null - CONST Int type=kotlin.collections.MutableList value=6 + then: GET_VAR 'val : kotlin.collections.MutableList? [val] declared in .test' type=kotlin.collections.MutableList origin=null + SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + CONST Int type=kotlin.collections.MutableList value=6 FUN name:testExtensionReceiver visibility:public modality:FINAL <> ($receiver:kotlin.collections.MutableList) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:kotlin.collections.MutableList BLOCK_BODY @@ -210,4 +210,3 @@ FILE fqName: fileName:/kt30020.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - diff --git a/compiler/testData/ir/irText/expressions/kt30796.fir.txt b/compiler/testData/ir/irText/expressions/kt30796.fir.txt index 6e432a8ac8c..5749165de01 100644 --- a/compiler/testData/ir/irText/expressions/kt30796.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30796.fir.txt @@ -11,10 +11,10 @@ FILE fqName: fileName:/kt30796.kt VALUE_PARAMETER name:value2 index:1 type:T of .test BLOCK_BODY VAR name:x1 type:kotlin.Any [val] - BLOCK type=kotlin.Any? origin=ELVIS + BLOCK type=kotlin.Any origin=ELVIS VAR name: 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=ELVIS 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 : T of .test [val] declared in .test' type=T of .test origin=null @@ -22,20 +22,20 @@ FILE fqName: fileName:/kt30796.kt then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null VAR name:x2 type:kotlin.Any [val] - BLOCK type=kotlin.Any? origin=ELVIS + BLOCK type=kotlin.Any origin=ELVIS VAR name: 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=ELVIS 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 : T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null - then: BLOCK type=kotlin.Any? origin=ELVIS + then: BLOCK type=kotlin.Any origin=ELVIS VAR name: 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=ELVIS 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 : T of .test [val] declared in .test' type=T of .test origin=null @@ -43,12 +43,12 @@ FILE fqName: fileName:/kt30796.kt then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null VAR name:x3 type:kotlin.Any [val] - BLOCK type=kotlin.Any? origin=ELVIS + BLOCK type=kotlin.Any origin=ELVIS VAR name: type:T of .test [val] BLOCK type=T of .test origin=ELVIS VAR name: type:T of .test [val] @@ -61,8 +61,8 @@ FILE fqName: fileName:/kt30796.kt then: GET_VAR 'value2: T of .test declared in .test' type=T of .test origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any? origin=ELVIS + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + WHEN type=kotlin.Any origin=ELVIS 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 : T of .test [val] declared in .test' type=T of .test origin=null @@ -70,9 +70,9 @@ FILE fqName: fileName:/kt30796.kt then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null VAR name:x4 type:kotlin.Any [val] - BLOCK type=kotlin.Any? origin=ELVIS + BLOCK type=kotlin.Any origin=ELVIS VAR name: type:T of .test [val] BLOCK type=T of .test origin=ELVIS VAR name: type:T of .test [val] @@ -85,8 +85,8 @@ FILE fqName: fileName:/kt30796.kt then: GET_VAR 'value2: T of .test declared in .test' type=T of .test origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any? origin=ELVIS + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + WHEN type=kotlin.Any origin=ELVIS 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 : T of .test [val] declared in .test' type=T of .test origin=null @@ -94,7 +94,7 @@ FILE fqName: fileName:/kt30796.kt then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null VAR name:x5 type:kotlin.Any [val] BLOCK type=kotlin.Int origin=ELVIS VAR name: type:kotlin.Nothing [val] @@ -110,32 +110,32 @@ FILE fqName: fileName:/kt30796.kt if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val : kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null VAR name:x6 type:kotlin.Any [val] - BLOCK type=kotlin.Any? origin=ELVIS - VAR name: type:T of .test [val] - BLOCK type=T of .test origin=ELVIS + BLOCK type=kotlin.Any origin=ELVIS + VAR name: type:kotlin.Any [val] + BLOCK type=kotlin.Any origin=ELVIS VAR name: type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null - WHEN type=T of .test origin=ELVIS + WHEN type=kotlin.Any origin=ELVIS 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 : T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null - then: CALL 'public final fun magic (): T of .magic declared in ' type=T of .test origin=null + then: CALL 'public final fun magic (): T of .magic declared in ' type=kotlin.Any origin=null : BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null - WHEN type=kotlin.Any? origin=ELVIS + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + WHEN type=kotlin.Any origin=ELVIS 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 : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val : kotlin.Any [val] declared in .test' type=kotlin.Any origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + then: GET_VAR 'val : kotlin.Any [val] declared in .test' type=kotlin.Any origin=null VAR name:x7 type:kotlin.Any [val] - BLOCK type=kotlin.Any? origin=ELVIS + BLOCK type=kotlin.Any origin=ELVIS VAR name: type:T of .test [val] BLOCK type=T of .test origin=ELVIS VAR name: type:kotlin.Nothing [val] @@ -150,7 +150,7 @@ FILE fqName: fileName:/kt30796.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val : kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null - WHEN type=kotlin.Any? origin=ELVIS + WHEN type=kotlin.Any origin=ELVIS 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 : T of .test [val] declared in .test' type=T of .test origin=null @@ -158,4 +158,4 @@ FILE fqName: fileName:/kt30796.kt then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt index 00d8591045f..56dbbef4ecc 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt @@ -32,7 +32,7 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt $receiver: VALUE_PARAMETER name: type:kotlin.Int? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun inc (): kotlin.Int? declared in test' - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int? origin=null $this: GET_VAR ': kotlin.Int? declared in test.inc' type=kotlin.Int? origin=null FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Int?, index:kotlin.Int) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.Int? diff --git a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt index c5c0b893c15..76d49f5852e 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt @@ -64,18 +64,18 @@ FILE fqName: fileName:/safeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (x: kotlin.String?): kotlin.Int? declared in ' ERROR_CALL 'No getter found for R|kotlin/String.length|' type=kotlin.Int? - FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.String?) returnType:kotlin.Int + FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.String?) returnType:kotlin.Int? VALUE_PARAMETER name:x index:0 type:kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.String?): kotlin.Int declared in ' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.String?): kotlin.Int? declared in ' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int? origin=null $this: GET_VAR 'x: kotlin.String? declared in .test2' type=kotlin.String? origin=null - FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.String?, y:kotlin.Any?) returnType:kotlin.Boolean + FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.String?, y:kotlin.Any?) returnType:kotlin.Boolean? VALUE_PARAMETER name:x index:0 type:kotlin.String? VALUE_PARAMETER name:y index:1 type:kotlin.Any? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.String?, y: kotlin.Any?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null + RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.String?, y: kotlin.Any?): kotlin.Boolean? declared in ' + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean? origin=null $this: GET_VAR 'x: kotlin.String? declared in .test3' type=kotlin.String? origin=null other: GET_VAR 'y: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null FUN name:test4 visibility:public modality:FINAL <> (x:.Ref?) returnType:kotlin.Unit @@ -84,12 +84,12 @@ FILE fqName: fileName:/safeCalls.kt SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:private' type=kotlin.Unit origin=null receiver: GET_VAR 'x: .Ref? declared in .test4' type=.Ref? origin=null value: CONST Int type=kotlin.Int? value=0 - FUN name:test5 visibility:public modality:FINAL <> ($receiver:.IHost, s:kotlin.String?) returnType:kotlin.Int + FUN name:test5 visibility:public modality:FINAL <> ($receiver:.IHost, s:kotlin.String?) returnType:kotlin.Int? $receiver: VALUE_PARAMETER name: type:.IHost VALUE_PARAMETER name:s index:0 type:kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test5 (s: kotlin.String?): kotlin.Int declared in ' - CALL 'public open fun extLength (): kotlin.Int declared in .IHost' type=kotlin.Int origin=null + RETURN type=kotlin.Nothing from='public final fun test5 (s: kotlin.String?): kotlin.Int? declared in ' + CALL 'public open fun extLength (): kotlin.Int declared in .IHost' type=kotlin.Int? origin=null $this: GET_VAR ': .IHost declared in .IHost' type=.IHost origin=null FUN name:foo visibility:public modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.Int @@ -98,5 +98,5 @@ FILE fqName: fileName:/safeCalls.kt CONST Int type=kotlin.Int value=239 FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - CALL 'public final fun foo (): kotlin.Int declared in ' type=kotlin.Int origin=null + CALL 'public final fun foo (): kotlin.Int declared in ' type=kotlin.Int? origin=null $receiver: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.txt index 3f491c508fe..becad73bfcc 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.txt @@ -11,4 +11,4 @@ FILE fqName: fileName:/samConversionInGenericConstructorCall.kt TYPE_OP type=kotlin.Function1 origin=CAST typeOperand=kotlin.Function1 GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Any origin=null ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Any origin=null + GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Function1 origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt index 66ed86cdd4d..296b6ac7333 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt @@ -89,4 +89,4 @@ FILE fqName: fileName:/samConversionInGenericConstructorCall_NI.kt TYPE_OP type=kotlin.Function1 origin=CAST typeOperand=kotlin.Function1 GET_VAR 'x: kotlin.Any declared in .testGenericJavaCtor2' type=kotlin.Any origin=null ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Any declared in .testGenericJavaCtor2' type=kotlin.Any origin=null + GET_VAR 'x: kotlin.Any declared in .testGenericJavaCtor2' type=kotlin.Function1 origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt index 6ecaed79991..64038d2dc64 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt @@ -31,15 +31,15 @@ FILE fqName: fileName:/samConversionToGeneric.kt BLOCK_BODY TYPE_OP type=.J origin=CAST typeOperand=.J GET_VAR 'a: kotlin.Any declared in .test4' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Any declared in .test4' type=kotlin.Any origin=null + CALL 'public open fun bar (j: .J?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + j: GET_VAR 'a: kotlin.Any declared in .test4' type=.J origin=null FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY TYPE_OP type=kotlin.Function1 origin=CAST typeOperand=kotlin.Function1 GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null + GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Function1 origin=null FUN name:test6 visibility:public modality:FINAL (a:kotlin.Function1.test6, T of .test6>) returnType:kotlin.Unit TYPE_PARAMETER name:T index:0 variance: superTypes:[] VALUE_PARAMETER name:a index:0 type:kotlin.Function1.test6, T of .test6> @@ -53,7 +53,7 @@ FILE fqName: fileName:/samConversionToGeneric.kt TYPE_OP type=kotlin.Function1.test7, T of .test7> origin=CAST typeOperand=kotlin.Function1.test7, T of .test7> GET_VAR 'a: kotlin.Any declared in .test7' type=kotlin.Any origin=null ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Any declared in .test7' type=kotlin.Any origin=null + GET_VAR 'a: kotlin.Any declared in .test7' type=kotlin.Function1.test7, T of .test7> origin=null FUN name:test8 visibility:public modality:FINAL <> (efn:kotlin.Function1) returnType:IrErrorType VALUE_PARAMETER name:efn index:0 type:kotlin.Function1 BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt index 68dc52a8da9..0546a4fb9b0 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt @@ -2,31 +2,33 @@ 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=IrErrorType 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 - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Function0 declared in .test1' type=kotlin.Function0 origin=null + then: CALL 'public open fun runStatic (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + r: GET_VAR 'a: kotlin.Function0 declared in .test1' type=java.lang.Runnable origin=null 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=IrErrorType 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 - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Function0 declared in .test2' type=kotlin.Function0 origin=null + then: CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null + r: GET_VAR 'a: kotlin.Function0 declared in .test2' type=java.lang.Runnable origin=null 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=IrErrorType 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 - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null - GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null + then: CALL 'public open fun run2 (r1: java.lang.Runnable?, r2: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null + r1: GET_VAR 'a: kotlin.Function0 declared in .test3' type=java.lang.Runnable origin=null + r2: GET_VAR 'a: kotlin.Function0 declared in .test3' type=java.lang.Runnable origin=null FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Function0, b:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0 VALUE_PARAMETER name:b index:1 type:kotlin.Function0 @@ -36,43 +38,45 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt 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 then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Function0 declared in .test4' type=kotlin.Function0 origin=null + GET_VAR 'a: kotlin.Function0 declared in .test4' type=java.lang.Runnable origin=null GET_VAR 'b: kotlin.Function0 declared in .test4' type=kotlin.Function0 origin=null 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=IrErrorType 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 - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null + then: CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null + r: GET_VAR 'a: kotlin.Any declared in .test5' type=java.lang.Runnable origin=null 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=IrErrorType 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 - then: BLOCK type=IrErrorType origin=null + then: BLOCK type=kotlin.Unit origin=null TYPE_OP type=kotlin.Function0 origin=CAST typeOperand=kotlin.Function0 - GET_VAR 'a: kotlin.Any declared in .test5x' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Any declared in .test5x' type=kotlin.Any origin=null + GET_VAR 'a: kotlin.Any declared in .test5x' type=java.lang.Runnable origin=null + CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null + r: GET_VAR 'a: kotlin.Any declared in .test5x' type=java.lang.Runnable origin=null FUN name:test6 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY TYPE_OP type=kotlin.Function0 origin=CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Any declared in .test6' type=kotlin.Any origin=null ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Any declared in .test6' type=kotlin.Any origin=null + GET_VAR 'a: kotlin.Any declared in .test6' type=kotlin.Function0 origin=null FUN name:test7 visibility:public modality:FINAL <> (a:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function1 BLOCK_BODY TYPE_OP type=kotlin.Function0 origin=CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Function1 declared in .test7' type=kotlin.Function1 origin=null ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Function1 declared in .test7' type=kotlin.Function1 origin=null + GET_VAR 'a: kotlin.Function1 declared in .test7' type=kotlin.Function0 origin=null FUN name:test8 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt index c71bf5338e9..6f3b1cc2016 100644 --- a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt @@ -16,7 +16,7 @@ FILE fqName: fileName:/Derived.kt then: BLOCK type=kotlin.Unit origin=null SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.String? visibility:public' type=kotlin.Unit origin=null receiver: GET_VAR ': .Base declared in .Base' type=.Base origin=null - value: GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.Any origin=null + value: GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.String origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/smartCasts.fir.txt b/compiler/testData/ir/irText/expressions/smartCasts.fir.txt index 5f2035d6305..bbb8f8bd858 100644 --- a/compiler/testData/ir/irText/expressions/smartCasts.fir.txt +++ b/compiler/testData/ir/irText/expressions/smartCasts.fir.txt @@ -24,15 +24,15 @@ FILE fqName: fileName:/smartCasts.kt GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun test1 (x: kotlin.Any): kotlin.Unit declared in ' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.Any origin=null + CALL 'public final fun println (message: kotlin.Int): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null + message: ERROR_CALL 'No getter found for R|kotlin/String.length|' type=kotlin.Int + CALL 'public final fun expectsString (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + s: GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.String origin=null CALL 'public final fun expectsInt (i: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null - i: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CALL 'public final fun overloaded (x: kotlin.Any): kotlin.Any declared in ' type=kotlin.Any origin=null - x: GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.Any origin=null + i: ERROR_CALL 'No getter found for R|kotlin/String.length|' type=kotlin.Int + CALL 'public final fun expectsString (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + s: CALL 'public final fun overloaded (s: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + s: GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.String origin=null FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY @@ -43,8 +43,8 @@ FILE fqName: fileName:/smartCasts.kt then: RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.Any): kotlin.String declared in ' CONST String type=kotlin.String value="" RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.Any): kotlin.String declared in ' - CALL 'public final fun overloaded (x: kotlin.Any): kotlin.Any declared in ' type=kotlin.Any origin=null - x: GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Any origin=null + CALL 'public final fun overloaded (s: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + s: GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.String origin=null FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY @@ -55,4 +55,4 @@ FILE fqName: fileName:/smartCasts.kt then: RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Any): kotlin.String declared in ' CONST String type=kotlin.String value="" RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Any): kotlin.String declared in ' - GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.Any origin=null + GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt index f8ad1a50067..8d074ef72f8 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt @@ -48,10 +48,11 @@ FILE fqName: fileName:/smartCastsWithDestructuring.kt GET_VAR 'x: .I1 declared in .test' type=.I1 origin=null then: RETURN type=kotlin.Nothing from='public final fun test (x: .I1): kotlin.Unit declared in ' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - VAR name: type:.I1 [val] - GET_VAR 'x: .I1 declared in .test' type=.I1 origin=null + VAR name: type:.I2 [val] + GET_VAR 'x: .I1 declared in .test' type=.I2 origin=null VAR name:c1 type:kotlin.Int [val] CALL 'public final fun component1 (): kotlin.Int declared in ' type=kotlin.Int origin=null - $receiver: GET_VAR 'val : .I1 [val] declared in .test' type=.I1 origin=null - VAR name:c2 type:IrErrorType [val] - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + $receiver: GET_VAR 'val : .I2 [val] declared in .test' type=.I2 origin=null + VAR name:c2 type:kotlin.String [val] + CALL 'public final fun component2 (): kotlin.String declared in ' type=kotlin.String origin=null + $receiver: GET_VAR 'val : .I2 [val] declared in .test' type=.I2 origin=null diff --git a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt index 7b6fdde6506..8775f77f345 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt @@ -32,7 +32,7 @@ FILE fqName: fileName:/temporaryInEnumEntryInitializer.kt CONSTRUCTOR visibility:public <> () returnType:.En.ENTRY [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.String?) [primary] declared in .En' - x: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + x: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String? origin=null $this: CALL 'public final fun (): kotlin.Any? declared in ' type=kotlin.Any? origin=null INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:public superTypes:[.En]' FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/temporaryInInitBlock.fir.txt b/compiler/testData/ir/irText/expressions/temporaryInInitBlock.fir.txt index bc196e56565..36a8537399c 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInInitBlock.fir.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInInitBlock.fir.txt @@ -19,7 +19,7 @@ FILE fqName: fileName:/temporaryInInitBlock.kt BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String? visibility:private [final]' type=kotlin.Unit origin=null receiver: GET_VAR ': .C declared in .C' type=.C origin=null - value: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + value: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String? origin=null $this: GET_VAR 'x: kotlin.Any? declared in .C.' type=kotlin.Any? origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: diff --git a/compiler/testData/ir/irText/expressions/throw.fir.txt b/compiler/testData/ir/irText/expressions/throw.fir.txt index 5c0f415aca8..ff79ded8a7a 100644 --- a/compiler/testData/ir/irText/expressions/throw.fir.txt +++ b/compiler/testData/ir/irText/expressions/throw.fir.txt @@ -11,4 +11,4 @@ FILE fqName: fileName:/throw.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Throwable GET_VAR 'a: kotlin.Any declared in .testImplicitCast' type=kotlin.Any origin=null then: THROW type=kotlin.Nothing - GET_VAR 'a: kotlin.Any declared in .testImplicitCast' type=kotlin.Any origin=null + GET_VAR 'a: kotlin.Any declared in .testImplicitCast' type=kotlin.Throwable origin=null diff --git a/compiler/testData/ir/irText/expressions/typeArguments.fir.txt b/compiler/testData/ir/irText/expressions/typeArguments.fir.txt index 647b2403721..62f68dc7e95 100644 --- a/compiler/testData/ir/irText/expressions/typeArguments.fir.txt +++ b/compiler/testData/ir/irText/expressions/typeArguments.fir.txt @@ -7,7 +7,8 @@ FILE fqName: fileName:/typeArguments.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Array<*> GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.Any origin=null - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType + then: CALL 'public final fun isArrayOf (): kotlin.Boolean declared in kotlin.jvm' type=kotlin.Boolean origin=null + $receiver: GET_VAR 'x: kotlin.Any declared in .test1' type=kotlin.Array<*> origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/varargWithImplicitCast.fir.txt b/compiler/testData/ir/irText/expressions/varargWithImplicitCast.fir.txt index 0b2f5f44528..3b93d65dfcb 100644 --- a/compiler/testData/ir/irText/expressions/varargWithImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/expressions/varargWithImplicitCast.fir.txt @@ -9,8 +9,8 @@ FILE fqName: fileName:/varargWithImplicitCast.kt then: RETURN type=kotlin.Nothing from='public final fun testScalar (a: kotlin.Any): kotlin.IntArray declared in ' CALL 'public final fun intArrayOf (elements: kotlin.IntArray): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null RETURN type=kotlin.Nothing from='public final fun testScalar (a: kotlin.Any): kotlin.IntArray declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Any declared in .testScalar' type=kotlin.Any origin=null + CALL 'public final fun intArrayOf (elements: kotlin.IntArray): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null + elements: GET_VAR 'a: kotlin.Any declared in .testScalar' type=kotlin.Int origin=null FUN name:testSpread visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.IntArray VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY @@ -21,5 +21,5 @@ FILE fqName: fileName:/varargWithImplicitCast.kt then: RETURN type=kotlin.Nothing from='public final fun testSpread (a: kotlin.Any): kotlin.IntArray declared in ' CALL 'public final fun intArrayOf (elements: kotlin.IntArray): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null RETURN type=kotlin.Nothing from='public final fun testSpread (a: kotlin.Any): kotlin.IntArray declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'a: kotlin.Any declared in .testSpread' type=kotlin.Any origin=null + CALL 'public final fun intArrayOf (elements: kotlin.IntArray): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null + elements: GET_VAR 'a: kotlin.Any declared in .testSpread' type=kotlin.IntArray origin=null diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt index aeaddff6437..3439817dc7b 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt @@ -24,10 +24,10 @@ FILE fqName: fileName:/variableAsFunctionCall.kt ERROR_CALL 'Unresolved reference: #' type=IrErrorType CALL 'public final fun k (): kotlin.Function0 declared in ' type=kotlin.Function0 origin=null $receiver: CONST String type=kotlin.String value="hello" - FUN name:test4 visibility:public modality:FINAL <> (ns:kotlin.String?) returnType:kotlin.String + FUN name:test4 visibility:public modality:FINAL <> (ns:kotlin.String?) returnType:kotlin.String? VALUE_PARAMETER name:ns index:0 type:kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (ns: kotlin.String?): kotlin.String declared in ' - CALL 'public abstract fun invoke (): kotlin.String declared in kotlin.Function0' type=kotlin.String origin=null - $this: CALL 'public final fun k (): kotlin.Function0 declared in ' type=kotlin.Function0 origin=null + RETURN type=kotlin.Nothing from='public final fun test4 (ns: kotlin.String?): kotlin.String? declared in ' + CALL 'public abstract fun invoke (): kotlin.String declared in kotlin.Function0' type=kotlin.String? origin=null + $this: CALL 'public final fun k (): kotlin.Function0 declared in ' type=kotlin.Function0? origin=null $receiver: GET_VAR 'ns: kotlin.String? declared in .test4' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/expressions/when.fir.txt b/compiler/testData/ir/irText/expressions/when.fir.txt index d43176f7d4d..04fc292b6f1 100644 --- a/compiler/testData/ir/irText/expressions/when.fir.txt +++ b/compiler/testData/ir/irText/expressions/when.fir.txt @@ -63,21 +63,21 @@ FILE fqName: fileName:/when.kt then: CONST String type=kotlin.String value="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 'x: kotlin.Any? declared in .test' type=kotlin.Any? origin=null + arg0: GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any origin=null arg1: GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A then: CONST String type=kotlin.String value="A" BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String - GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any? origin=null + GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any origin=null then: CONST String type=kotlin.String value="String" BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Number - GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any? origin=null + GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any origin=null then: CONST String type=kotlin.String value="!Number" BRANCH if: CALL 'public final fun contains (element: T of ): kotlin.Boolean declared in kotlin.collections' type=kotlin.Boolean origin=null $receiver: CALL 'public final fun setOf (): kotlin.collections.Set> [inline] declared in kotlin.collections' type=kotlin.collections.Set origin=null - element: GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any? origin=null + element: GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Number origin=null then: CONST String type=kotlin.String value="nothingness?" BRANCH if: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt b/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt index d1ba2678e25..83db1c41a44 100644 --- a/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt +++ b/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt @@ -3,13 +3,13 @@ FILE fqName: fileName:/whenWithSubjectVariable.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Any declared in ' CONST Int type=kotlin.Any value=1 - FUN name:test visibility:public modality:FINAL <> () returnType:IrErrorType + FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test (): IrErrorType declared in ' - BLOCK type=IrErrorType origin=WHEN + RETURN type=kotlin.Nothing from='public final fun test (): kotlin.Int declared in ' + BLOCK type=kotlin.Int origin=WHEN VAR name:y type:kotlin.Any [val] CALL 'public final fun foo (): kotlin.Any declared in ' type=kotlin.Any origin=null - WHEN type=IrErrorType origin=WHEN + WHEN type=kotlin.Int 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 y: kotlin.Any [val] declared in .test' type=kotlin.Any origin=null @@ -18,7 +18,7 @@ FILE fqName: fileName:/whenWithSubjectVariable.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String GET_VAR 'val y: kotlin.Any [val] declared in .test' type=kotlin.Any origin=null - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType + then: ERROR_CALL 'No getter found for R|kotlin/String.length|' type=kotlin.Int BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Int GET_VAR 'val y: kotlin.Any [val] declared in .test' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt index 3beec847d10..decc70635ed 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt @@ -67,7 +67,7 @@ FILE fqName: fileName:/whileDoWhile.kt GET_VAR 'val a: kotlin.Any? [val] declared in .testSmartcastInCondition' type=kotlin.Any? origin=null then: BLOCK type=kotlin.Unit origin=null WHILE label=null origin=WHILE_LOOP - condition: GET_VAR 'val a: kotlin.Any? [val] declared in .testSmartcastInCondition' type=kotlin.Any? origin=null + condition: GET_VAR 'val a: kotlin.Any? [val] declared in .testSmartcastInCondition' type=kotlin.Boolean origin=null body: BLOCK type=kotlin.Unit origin=null DO_WHILE label=null origin=DO_WHILE_LOOP body: BLOCK type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt b/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt index 664d1b1655e..25e5de0622c 100644 --- a/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt +++ b/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt @@ -63,4 +63,4 @@ FILE fqName: fileName:/genericPropertyReferenceType.kt TYPE_OP type=.C origin=CAST typeOperand=.C GET_VAR 'a: kotlin.Any declared in .test2' type=kotlin.Any origin=null CALL 'public final fun use (p: kotlin.reflect.KMutableProperty): kotlin.Unit declared in ' type=kotlin.Unit origin=null - p: ERROR_CALL 'Unsupported callable reference: R|/a|::#' type=IrErrorType + p: PROPERTY_REFERENCE 'public final y: IrErrorType [var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (v: IrErrorType): kotlin.Unit declared in ' type=IrErrorType origin=null diff --git a/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.txt b/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.txt index c6965c6a84f..33675caf217 100644 --- a/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.txt +++ b/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.txt @@ -7,11 +7,14 @@ FILE fqName: fileName:/smartCastOnFieldReceiverOfGenericType.kt GET_VAR 'a: kotlin.Any declared in .testSetField' type=kotlin.Any origin=null TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String GET_VAR 'b: kotlin.Any declared in .testSetField' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:T of .JCell? visibility:public' type=kotlin.Unit origin=null + receiver: GET_VAR 'a: kotlin.Any declared in .testSetField' type=.JCell origin=null + value: GET_VAR 'b: kotlin.Any declared in .testSetField' type=kotlin.String origin=null FUN name:testGetField visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.String VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY TYPE_OP type=.JCell origin=CAST typeOperand=.JCell GET_VAR 'a: kotlin.Any declared in .testGetField' type=kotlin.Any origin=null RETURN type=kotlin.Nothing from='public final fun testGetField (a: kotlin.Any): kotlin.String declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:T of .JCell? visibility:public' type=T of .JCell? origin=GET_PROPERTY + receiver: GET_VAR 'a: kotlin.Any declared in .testGetField' type=.JCell origin=null diff --git a/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt b/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt index a667814e071..2ddccce7511 100644 --- a/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt +++ b/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt @@ -7,8 +7,9 @@ FILE fqName: fileName:/smartCastOnReceiverOfGenericType.kt GET_VAR 'a: kotlin.Any declared in .testFunction' type=kotlin.Any origin=null TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String GET_VAR 'b: kotlin.Any declared in .testFunction' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'b: kotlin.Any declared in .testFunction' type=kotlin.Any origin=null + CALL 'public abstract fun add (element: kotlin.String): kotlin.Boolean declared in kotlin.collections.MutableList' type=kotlin.Boolean origin=null + $this: GET_VAR 'a: kotlin.Any declared in .testFunction' type=kotlin.collections.MutableList origin=null + element: GET_VAR 'b: kotlin.Any declared in .testFunction' type=kotlin.String origin=null FUN name:testProperty visibility:public modality:FINAL <> (a:kotlin.Any, b:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any VALUE_PARAMETER name:b index:1 type:kotlin.Any @@ -17,7 +18,7 @@ FILE fqName: fileName:/smartCastOnReceiverOfGenericType.kt GET_VAR 'a: kotlin.Any declared in .testProperty' type=kotlin.Any origin=null TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String GET_VAR 'b: kotlin.Any declared in .testProperty' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + ERROR_CALL 'Unresolved reference: R|/Cell.value|' type=IrErrorType FUN name:testInnerClass visibility:public modality:FINAL <> (a:kotlin.Any, b:kotlin.Any, c:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any VALUE_PARAMETER name:b index:1 type:kotlin.Any @@ -29,9 +30,9 @@ FILE fqName: fileName:/smartCastOnReceiverOfGenericType.kt GET_VAR 'b: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String GET_VAR 'c: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'b: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null - GET_VAR 'c: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + GET_VAR 'b: kotlin.Any declared in .testInnerClass' type=kotlin.Int origin=null + GET_VAR 'c: kotlin.Any declared in .testInnerClass' type=kotlin.String origin=null FUN name:testNonSubstitutedTypeParameter visibility:public modality:FINAL (a:kotlin.Any, b:kotlin.Any) returnType:kotlin.Unit TYPE_PARAMETER name:T index:0 variance: superTypes:[] VALUE_PARAMETER name:a index:0 type:kotlin.Any @@ -41,8 +42,9 @@ FILE fqName: fileName:/smartCastOnReceiverOfGenericType.kt GET_VAR 'a: kotlin.Any declared in .testNonSubstitutedTypeParameter' type=kotlin.Any origin=null TYPE_OP type=kotlin.collections.List.testNonSubstitutedTypeParameter> origin=CAST typeOperand=kotlin.collections.List.testNonSubstitutedTypeParameter> GET_VAR 'b: kotlin.Any declared in .testNonSubstitutedTypeParameter' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'b: kotlin.Any declared in .testNonSubstitutedTypeParameter' type=kotlin.Any origin=null + CALL 'public abstract fun add (element: kotlin.collections.List.testNonSubstitutedTypeParameter>): kotlin.Boolean declared in kotlin.collections.MutableList' type=kotlin.Boolean origin=null + $this: GET_VAR 'a: kotlin.Any declared in .testNonSubstitutedTypeParameter' type=kotlin.collections.MutableList.testNonSubstitutedTypeParameter>> origin=null + element: GET_VAR 'b: kotlin.Any declared in .testNonSubstitutedTypeParameter' type=kotlin.collections.List.testNonSubstitutedTypeParameter> origin=null CLASS CLASS name:Cell modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Cell TYPE_PARAMETER name:T index:0 variance: superTypes:[]