From 865e0cc08023e8a813d20805a6ea82e4f760e79a Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Thu, 25 Apr 2019 16:11:29 +0300 Subject: [PATCH] IR: IrConstructorCall: fixes after rebase --- .../jvm/lower/CallableReferenceLowering.kt | 2 +- .../ir/declarations/lazy/IrLazyField.kt | 3 +- .../classes/delegatedImplementation.fir.txt | 2 +- .../declarations/constValInitializers.fir.txt | 5 +- .../ir/irText/expressions/bangbang.fir.txt | 16 ++--- .../breakContinueInLoopHeader.fir.txt | 12 ++-- ...nstructorWithOwnTypeParametersCall.fir.txt | 49 +++++++++++++ ...eqRhsConditionPossiblyAffectingLhs.fir.txt | 6 +- .../whenByFloatingPoint.fir.txt | 29 ++++---- .../expressions/forWithBreakContinue.fir.txt | 12 ++-- ...icConstructorCallWithTypeArguments.fir.txt | 51 +++++++++++++ .../javaSyntheticPropertyAccess.fir.txt | 14 ++-- .../ir/irText/expressions/kt28006.fir.txt | 33 +++++---- .../ir/irText/expressions/kt30020.fir.txt | 72 +++++++++---------- .../ir/irText/expressions/literals.fir.txt | 44 ++++++------ .../objectReferenceInFieldInitializer.fir.txt | 5 +- .../primitivesImplicitConversions.fir.txt | 3 +- .../expressions/simpleUnaryOperators.fir.txt | 42 +++++------ .../irText/regressions/coercionInLoop.fir.txt | 5 +- .../javaConstructorWithTypeParameters.fir.txt | 2 +- .../testData/ir/irText/types/kt30796.fir.txt | 37 ++++++++++ 21 files changed, 287 insertions(+), 157 deletions(-) create mode 100644 compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt create mode 100644 compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt create mode 100644 compiler/testData/ir/irText/types/kt30796.fir.txt diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CallableReferenceLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CallableReferenceLowering.kt index 6847fde95de..4290a1271e6 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CallableReferenceLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CallableReferenceLowering.kt @@ -58,7 +58,7 @@ import org.jetbrains.org.objectweb.asm.Type //Hack implementation to support CR java types in lower class CrIrType(val type: Type) : IrType { - override val annotations: List = emptyList() + override val annotations: List = emptyList() override fun equals(other: Any?): Boolean = other is CrIrType && type == other.type diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyField.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyField.kt index fa260e1c3cf..bc977f0cd26 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyField.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyField.kt @@ -12,6 +12,7 @@ import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrField import org.jetbrains.kotlin.ir.declarations.IrProperty import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.expressions.IrExpressionBody import org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBodyImpl import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol @@ -61,7 +62,7 @@ class IrLazyField( symbol.bind(this) } - override val annotations: MutableList = mutableListOf() + override val annotations: MutableList = mutableListOf() override val descriptor: PropertyDescriptor = symbol.descriptor diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt index a52b62c3853..74fcbf0c72d 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt @@ -154,7 +154,7 @@ FILE fqName: fileName:/delegatedImplementation.kt $this: VALUE_PARAMETER name: type:.otherImpl. VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY - CALL 'private constructor () [primary] declared in .otherImpl.' type=.otherImpl. origin=null + CONSTRUCTOR_CALL 'private constructor () [primary] declared in .otherImpl.' type=.otherImpl. origin=null CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 CONSTRUCTOR visibility:public <> () returnType:.Test1 [primary] diff --git a/compiler/testData/ir/irText/declarations/constValInitializers.fir.txt b/compiler/testData/ir/irText/declarations/constValInitializers.fir.txt index 97dbfd96550..7c8b571ed2b 100644 --- a/compiler/testData/ir/irText/declarations/constValInitializers.fir.txt +++ b/compiler/testData/ir/irText/declarations/constValInitializers.fir.txt @@ -59,8 +59,9 @@ FILE fqName: fileName:/constValInitializers.kt PROPERTY name:STR4 visibility:public modality:FINAL [const,val] FIELD PROPERTY_BACKING_FIELD name:STR4 type:kotlin.String visibility:public [final,static] EXPRESSION_BODY - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - other: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=null + STRING_CONCATENATION type=kotlin.String + CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:STR4 visibility:public modality:FINAL [const,val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/bangbang.fir.txt b/compiler/testData/ir/irText/expressions/bangbang.fir.txt index b200b7fcda9..960a4b9bdc4 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.fir.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.fir.txt @@ -1,12 +1,12 @@ FILE fqName: fileName:/bangbang.kt - FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:IrErrorType + FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Nothing VALUE_PARAMETER name:a index:0 type:kotlin.Any? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?): IrErrorType declared in ' - BLOCK type=IrErrorType origin=EXCLEXCL + RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?): kotlin.Nothing declared in ' + BLOCK type=kotlin.Nothing origin=EXCLEXCL VAR name: type:kotlin.Any? [val] GET_VAR 'a: kotlin.Any? declared in .test1' type=kotlin.Any? origin=null - WHEN type=IrErrorType origin=EXCLEXCL + WHEN type=kotlin.Nothing 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.Any? [val] declared in .test1' type=kotlin.Any? origin=null @@ -16,14 +16,14 @@ FILE fqName: fileName:/bangbang.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true 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:IrErrorType + FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Nothing VALUE_PARAMETER name:a index:0 type:kotlin.Any? BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any?): IrErrorType declared in ' - BLOCK type=IrErrorType origin=EXCLEXCL + RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any?): kotlin.Nothing declared in ' + BLOCK type=kotlin.Nothing origin=EXCLEXCL VAR name: type:kotlin.Int [val] CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - WHEN type=IrErrorType origin=EXCLEXCL + WHEN type=kotlin.Nothing 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 diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt index aec6223d569..5af9aba2f79 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt @@ -45,11 +45,11 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt WHILE label=L origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true body: BLOCK type=kotlin.Unit origin=null - VAR name: type:IrErrorType [val] - BLOCK type=IrErrorType origin=ELVIS + VAR name: type:kotlin.Nothing [val] + BLOCK type=kotlin.Nothing origin=ELVIS VAR name: type:kotlin.collections.List? [val] GET_VAR 'ss: kotlin.collections.List? declared in .test3' type=kotlin.collections.List? origin=null - WHEN type=IrErrorType origin=ELVIS + WHEN type=kotlin.Nothing 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.collections.List? [val] declared in .test3' type=kotlin.collections.List? origin=null @@ -71,11 +71,11 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt WHILE label=L origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true body: BLOCK type=kotlin.Unit origin=null - VAR name: type:IrErrorType [val] - BLOCK type=IrErrorType origin=ELVIS + VAR name: type:kotlin.Nothing [val] + BLOCK type=kotlin.Nothing origin=ELVIS VAR name: type:kotlin.collections.List? [val] GET_VAR 'ss: kotlin.collections.List? declared in .test4' type=kotlin.collections.List? origin=null - WHEN type=IrErrorType origin=ELVIS + WHEN type=kotlin.Nothing 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.collections.List? [val] declared in .test4' type=kotlin.collections.List? origin=null diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt new file mode 100644 index 00000000000..c3d638267e8 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt @@ -0,0 +1,49 @@ +FILE fqName: fileName:/constructorWithOwnTypeParametersCall.kt + FUN name:testKotlin visibility:public modality:FINAL <> () returnType:IrErrorType + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun testKotlin (): IrErrorType declared in ' + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + FUN name:testJava visibility:public modality:FINAL <> () returnType:IrErrorType + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun testJava (): IrErrorType declared in ' + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + CLASS CLASS name:K1 modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1 + TYPE_PARAMETER name:T1 index:0 variance: superTypes:[] + CONSTRUCTOR visibility:public <> () returnType:.K1.K1> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K1 modality:FINAL visibility:public superTypes:[kotlin.Any]' + CLASS CLASS name:K2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K2 + TYPE_PARAMETER name:T2 index:0 variance: superTypes:[] + CONSTRUCTOR visibility:public <> () returnType:.K1.K2.K1.K2> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' + 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + 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/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt index 01e180d6f07..12f32e9f0bd 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt @@ -5,14 +5,14 @@ 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=IrErrorType origin=IF + arg1: WHEN type=kotlin.Nothing 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 - then: BLOCK type=IrErrorType origin=EXCLEXCL + then: BLOCK type=kotlin.Nothing origin=EXCLEXCL VAR name: type:kotlin.Nothing? [val] CONST Null type=kotlin.Nothing? value=null - WHEN type=IrErrorType origin=EXCLEXCL + WHEN type=kotlin.Nothing 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.Nothing? [val] declared in .test' type=kotlin.Nothing? origin=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt index c9b24eaba3a..1c92e23adc0 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt @@ -22,8 +22,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testSmartCastInWhenSubject' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenSubject (x: kotlin.Any): kotlin.Int declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=1 + CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null 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] @@ -45,8 +44,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .testSmartCastInWhenCondition' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenCondition (x: kotlin.Double, y: kotlin.Any): kotlin.Int declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=1 + CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenCondition (x: kotlin.Double, y: kotlin.Any): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp2_subject type:kotlin.Double [val] @@ -59,26 +57,25 @@ FILE fqName: fileName:/whenByFloatingPoint.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Int type=kotlin.Int value=1 - FUN name:testSmartCastInWhenConditionInBranch visibility:public modality:FINAL <> (x:kotlin.Any) returnType:IrErrorType + FUN name:testSmartCastInWhenConditionInBranch visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Int VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenConditionInBranch (x: kotlin.Any): IrErrorType declared in ' - BLOCK type=IrErrorType origin=WHEN + RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenConditionInBranch (x: kotlin.Any): kotlin.Int declared in ' + BLOCK type=kotlin.Int origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp3_subject type:kotlin.Any [val] - WHEN type=IrErrorType origin=WHEN + WHEN type=kotlin.Int origin=WHEN BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'val tmp3_subject: kotlin.Any [val] declared in .testSmartCastInWhenConditionInBranch' type=kotlin.Any origin=null - then: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=1 + then: CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp3_subject: kotlin.Any [val] declared in .testSmartCastInWhenConditionInBranch' type=kotlin.Any origin=null - arg1: CONST Double type=IrErrorType value=0.0 - then: CONST Int type=IrErrorType value=0 + arg1: CONST Double type=kotlin.Int value=0.0 + then: CONST Int type=kotlin.Int value=0 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CONST Int type=IrErrorType value=1 + then: CONST Int type=kotlin.Int value=1 FUN name:testSmartCastToDifferentTypes visibility:public modality:FINAL <> (x:kotlin.Any, y:kotlin.Any) returnType:kotlin.Int VALUE_PARAMETER name:x index:0 type:kotlin.Any VALUE_PARAMETER name:y index:1 type:kotlin.Any @@ -88,15 +85,13 @@ FILE fqName: fileName:/whenByFloatingPoint.kt if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testSmartCastToDifferentTypes' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastToDifferentTypes (x: kotlin.Any, y: kotlin.Any): kotlin.Int declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=1 + CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null WHEN type=kotlin.Int origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .testSmartCastToDifferentTypes' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastToDifferentTypes (x: kotlin.Any, y: kotlin.Any): kotlin.Int declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=1 + CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null 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] diff --git a/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.txt b/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.txt index 7df62b173a0..7e365ff9552 100644 --- a/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.txt +++ b/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.txt @@ -8,7 +8,7 @@ FILE fqName: fileName:/forWithBreakContinue.kt CALL 'public abstract fun iterator (): kotlin.collections.Iterator> declared in kotlin.collections.List' type=kotlin.collections.Iterator> origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - body: BLOCK type=IrErrorType origin=null + body: BLOCK type=kotlin.Nothing origin=null VAR name:s type:T of [val] CALL 'public abstract fun next (): T of declared in kotlin.collections.Iterator' type=T of origin=null BREAK label=null loop.label=null @@ -21,7 +21,7 @@ FILE fqName: fileName:/forWithBreakContinue.kt CALL 'public abstract fun iterator (): kotlin.collections.Iterator> declared in kotlin.collections.List' type=kotlin.collections.Iterator> origin=null WHILE label=OUTER origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - body: BLOCK type=IrErrorType origin=null + body: BLOCK type=kotlin.Nothing origin=null VAR name:s1 type:T of [val] CALL 'public abstract fun next (): T of declared in kotlin.collections.Iterator' type=T of origin=null VAR name: type:kotlin.collections.List [val] @@ -30,7 +30,7 @@ FILE fqName: fileName:/forWithBreakContinue.kt CALL 'public abstract fun iterator (): kotlin.collections.Iterator> declared in kotlin.collections.List' type=kotlin.collections.Iterator> origin=null WHILE label=INNER origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - body: BLOCK type=IrErrorType origin=null + body: BLOCK type=kotlin.Nothing origin=null VAR name:s2 type:T of [val] CALL 'public abstract fun next (): T of declared in kotlin.collections.Iterator' type=T of origin=null BREAK label=OUTER loop.label=OUTER @@ -46,7 +46,7 @@ FILE fqName: fileName:/forWithBreakContinue.kt CALL 'public abstract fun iterator (): kotlin.collections.Iterator> declared in kotlin.collections.List' type=kotlin.collections.Iterator> origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - body: BLOCK type=IrErrorType origin=null + body: BLOCK type=kotlin.Nothing origin=null VAR name:s type:T of [val] CALL 'public abstract fun next (): T of declared in kotlin.collections.Iterator' type=T of origin=null CONTINUE label=null loop.label=null @@ -59,7 +59,7 @@ FILE fqName: fileName:/forWithBreakContinue.kt CALL 'public abstract fun iterator (): kotlin.collections.Iterator> declared in kotlin.collections.List' type=kotlin.collections.Iterator> origin=null WHILE label=OUTER origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - body: BLOCK type=IrErrorType origin=null + body: BLOCK type=kotlin.Nothing origin=null VAR name:s1 type:T of [val] CALL 'public abstract fun next (): T of declared in kotlin.collections.Iterator' type=T of origin=null VAR name: type:kotlin.collections.List [val] @@ -68,7 +68,7 @@ FILE fqName: fileName:/forWithBreakContinue.kt CALL 'public abstract fun iterator (): kotlin.collections.Iterator> declared in kotlin.collections.List' type=kotlin.collections.Iterator> origin=null WHILE label=INNER origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - body: BLOCK type=IrErrorType origin=null + body: BLOCK type=kotlin.Nothing origin=null VAR name:s2 type:T of [val] CALL 'public abstract fun next (): T of declared in kotlin.collections.Iterator' type=T of origin=null CONTINUE label=OUTER loop.label=OUTER diff --git a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt new file mode 100644 index 00000000000..09a86e1302d --- /dev/null +++ b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt @@ -0,0 +1,51 @@ +FILE fqName: fileName:/genericConstructorCallWithTypeArguments.kt + FUN name:testSimple visibility:public modality:FINAL <> () returnType:.Box.Box> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun testSimple (): .Box.Box> declared in ' + CONSTRUCTOR_CALL 'public constructor (value: T of .Box) [primary] declared in .Box' type=.Box.Box> origin=null + FUN name:testArray visibility:public modality:FINAL (n:kotlin.Int, block:kotlin.Function0) returnType:kotlin.Array.testArray> [inline] + TYPE_PARAMETER name:T index:0 variance: superTypes:[] + VALUE_PARAMETER name:n index:0 type:kotlin.Int + VALUE_PARAMETER name:block index:1 type:kotlin.Function0 [crossinline] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun testArray (n: kotlin.Int, block: kotlin.Function0): kotlin.Array.testArray> [inline] declared in ' + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + GET_VAR 'n: kotlin.Int declared in .testArray' type=kotlin.Int origin=null + BLOCK type=IrErrorType origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:IrErrorType + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): IrErrorType declared in .testArray' + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + FUNCTION_REFERENCE 'local final fun (): IrErrorType declared in .testArray' type=IrErrorType origin=LAMBDA + CLASS CLASS name:Box modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Box + TYPE_PARAMETER name:T index:0 variance: superTypes:[] + CONSTRUCTOR visibility:public <> (value:T of .Box) returnType:.Box.Box> [primary] + VALUE_PARAMETER name:value index:0 type:T of .Box + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Box modality:FINAL visibility:public superTypes:[kotlin.Any]' + PROPERTY name:value visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:value type:T of .Box visibility:public [final] + EXPRESSION_BODY + GET_VAR 'value: T of .Box declared in .Box.' type=T of .Box origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Box) returnType:T of .Box + correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.Box + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): T of .Box declared in .Box' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .Box visibility:public [final] ' type=T of .Box origin=null + receiver: GET_VAR ': .Box declared in .Box.' type=.Box 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + 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/javaSyntheticPropertyAccess.fir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt index 7e9f4e06f36..7a3d4758535 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt @@ -2,10 +2,10 @@ FILE fqName: fileName:/javaSyntheticPropertyAccess.kt FUN name:test visibility:public modality:FINAL <> (j:.J) returnType:kotlin.Unit VALUE_PARAMETER name:j index:0 type:.J BLOCK_BODY - ERROR_CALL 'No getter found for R|/J.foo|' type=kotlin.Int - ERROR_CALL 'Unresolved reference: R|/J.foo|' type=IrErrorType - VAR name: type:kotlin.Int [val] - ERROR_CALL 'No getter found for R|/J.foo|' type=kotlin.Int - ERROR_CALL 'Unresolved reference: R|/J.foo|' type=IrErrorType - GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null - ERROR_CALL 'Unresolved reference: R|/J.foo|' type=IrErrorType + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + VAR name: type:IrErrorType [val] + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + GET_VAR 'val : IrErrorType [val] declared in .test' type=IrErrorType origin=null + ERROR_CALL 'Unresolved reference: #' type=IrErrorType diff --git a/compiler/testData/ir/irText/expressions/kt28006.fir.txt b/compiler/testData/ir/irText/expressions/kt28006.fir.txt index cddfa1b55c8..053b71e70a1 100644 --- a/compiler/testData/ir/irText/expressions/kt28006.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt28006.fir.txt @@ -38,7 +38,8 @@ FILE fqName: fileName:/kt28006.kt PROPERTY name:testConst3 visibility:public modality:FINAL [const,val] FIELD PROPERTY_BACKING_FIELD name:testConst3 type:kotlin.String visibility:public [final,static] EXPRESSION_BODY - ERROR_CALL 'Cannot bind 2 arguments to plus call with 1 parameters' type=kotlin.String + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String @@ -49,8 +50,9 @@ FILE fqName: fileName:/kt28006.kt PROPERTY name:testConst4 visibility:public modality:FINAL [const,val] FIELD PROPERTY_BACKING_FIELD name:testConst4 type:kotlin.String visibility:public [final,static] EXPRESSION_BODY - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - other: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=null + STRING_CONCATENATION type=kotlin.String + CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:testConst4 visibility:public modality:FINAL [const,val] BLOCK_BODY @@ -60,21 +62,24 @@ FILE fqName: fileName:/kt28006.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (x: kotlin.Int): kotlin.String declared in ' - ERROR_CALL 'Cannot bind 2 arguments to plus call with 1 parameters' type=kotlin.String - CONST String type=kotlin.String value="\uDD17" - GET_VAR 'x: kotlin.Int declared in .test1' type=kotlin.Int origin=null - FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:IrErrorType - VALUE_PARAMETER name:x index:0 type:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.Int): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" - FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:IrErrorType + GET_VAR 'x: kotlin.Int declared in .test1' type=kotlin.Int origin=null + FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Int): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.Int): kotlin.String declared in ' + STRING_CONCATENATION type=kotlin.String + GET_VAR 'x: kotlin.Int declared in .test2' type=kotlin.Int origin=null + CONST String type=kotlin.String value="\uD83E" + CONST String type=kotlin.String value="\uDD17" + FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String + VALUE_PARAMETER name:x index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Int): kotlin.String declared in ' + STRING_CONCATENATION type=kotlin.String + GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index 64e79e901af..e9721370cd6 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -36,11 +36,11 @@ FILE fqName: fileName:/kt30020.kt TYPE_OP type=kotlin.collections.MutableList origin=CAST typeOperand=kotlin.collections.MutableList CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null ERROR_CALL 'Unresolved reference: R|/|' type=IrErrorType - VAR name: type:IrErrorType [val] - BLOCK type=IrErrorType origin=EXCLEXCL + VAR name: type:kotlin.Nothing [val] + BLOCK type=kotlin.Nothing 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 - WHEN type=IrErrorType origin=EXCLEXCL + WHEN type=kotlin.Nothing 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 @@ -51,11 +51,11 @@ FILE fqName: fileName:/kt30020.kt 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 ERROR_CALL 'Unresolved reference: R|/|' type=IrErrorType - VAR name: type:IrErrorType [val] - BLOCK type=IrErrorType origin=EXCLEXCL + VAR name: type:kotlin.Nothing [val] + BLOCK type=kotlin.Nothing 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 - WHEN type=IrErrorType origin=EXCLEXCL + WHEN type=kotlin.Nothing 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 @@ -102,87 +102,87 @@ FILE fqName: fileName:/kt30020.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:add visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:E of ) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:add visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:kotlin.Int) returnType:kotlin.Boolean overridden: public abstract fun add (element: E of ): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - VALUE_PARAMETER name:element index:0 type:E of - FUN FAKE_OVERRIDE name:addAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:addAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun addAll (index: kotlin.Int, elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int - VALUE_PARAMETER name:elements index:1 type:kotlin.collections.Collection> + VALUE_PARAMETER name:elements index:1 type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:clear visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList) returnType:kotlin.Unit overridden: public abstract fun clear (): kotlin.Unit declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList) returnType:kotlin.collections.MutableListIterator> + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList) returnType:kotlin.collections.MutableListIterator overridden: public abstract fun listIterator (): kotlin.collections.MutableListIterator> declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - FUN FAKE_OVERRIDE name:remove visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:E of ) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:remove visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:kotlin.Int) returnType:kotlin.Boolean overridden: public abstract fun remove (element: E of ): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - VALUE_PARAMETER name:element index:0 type:E of - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun removeAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection> - FUN FAKE_OVERRIDE name:removeAt visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int) returnType:E of + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun removeAt (index: kotlin.Int): E of declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun retainAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection> - FUN FAKE_OVERRIDE name:set visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, element:E of ) returnType:E of + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:set visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, element:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun set (index: kotlin.Int, element: E of ): E of declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int - VALUE_PARAMETER name:element index:1 type:E of - FUN FAKE_OVERRIDE name:subList visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, fromIndex:kotlin.Int, toIndex:kotlin.Int) returnType:kotlin.collections.MutableList> + VALUE_PARAMETER name:element index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:subList visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, fromIndex:kotlin.Int, toIndex:kotlin.Int) returnType:kotlin.collections.MutableList overridden: public abstract fun subList (fromIndex: kotlin.Int, toIndex: kotlin.Int): kotlin.collections.MutableList> declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:fromIndex index:0 type:kotlin.Int VALUE_PARAMETER name:toIndex index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:.List, element:E of ) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:.List, element:kotlin.Int) returnType:kotlin.Boolean overridden: public abstract fun contains (element: E of ): kotlin.Boolean declared in .List $this: VALUE_PARAMETER name: type:.List - VALUE_PARAMETER name:element index:0 type:E of - FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Collection, element:E of ) returnType:kotlin.Boolean + VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Collection, element:kotlin.Int) returnType:kotlin.Boolean overridden: public abstract fun contains (element: E of ): kotlin.Boolean declared in kotlin.collections.Collection $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - VALUE_PARAMETER name:element index:0 type:E of - FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:.List, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:.List, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun containsAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in .List $this: VALUE_PARAMETER name: type:.List - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection> - FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Collection, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Collection, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun containsAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.Collection $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection> - FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:.List, index:kotlin.Int) returnType:E of + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:.List, index:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun get (index: kotlin.Int): E of declared in .List $this: VALUE_PARAMETER name: type:.List VALUE_PARAMETER name:index index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:indexOf visibility:public modality:ABSTRACT <> ($this:.List, element:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:ABSTRACT <> ($this:.List, element:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun indexOf (element: E of ): kotlin.Int declared in .List $this: VALUE_PARAMETER name: type:.List - VALUE_PARAMETER name:element index:0 type:E of + VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:ABSTRACT <> ($this:.List) returnType:kotlin.Boolean overridden: public abstract fun isEmpty (): kotlin.Boolean declared in .List @@ -191,19 +191,19 @@ FILE fqName: fileName:/kt30020.kt overridden: public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Collection $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:.List) returnType:kotlin.collections.Iterator> + FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:.List) returnType:kotlin.collections.Iterator overridden: public abstract fun iterator (): kotlin.collections.Iterator> declared in .List $this: VALUE_PARAMETER name: type:.List - FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:.MutableCollection) returnType:kotlin.collections.MutableIterator> + FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:.MutableCollection) returnType:kotlin.collections.MutableIterator overridden: public abstract fun iterator (): kotlin.collections.MutableIterator> declared in .MutableCollection $this: VALUE_PARAMETER name: type:.MutableCollection - FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:ABSTRACT <> ($this:.List, element:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:ABSTRACT <> ($this:.List, element:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun lastIndexOf (element: E of ): kotlin.Int declared in .List $this: VALUE_PARAMETER name: type:.List - VALUE_PARAMETER name:element index:0 type:E of + VALUE_PARAMETER name:element index:0 type:kotlin.Int 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/literals.fir.txt b/compiler/testData/ir/irText/expressions/literals.fir.txt index eef9bd1ffff..5ba58bf82ec 100644 --- a/compiler/testData/ir/irText/expressions/literals.fir.txt +++ b/compiler/testData/ir/irText/expressions/literals.fir.txt @@ -9,15 +9,14 @@ FILE fqName: fileName:/literals.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null PROPERTY name:test2 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [final,static] + FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:public [final,static] EXPRESSION_BODY - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=1 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:IrErrorType + CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null PROPERTY name:test3 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Boolean visibility:public [final,static] EXPRESSION_BODY @@ -64,15 +63,14 @@ FILE fqName: fileName:/literals.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Long declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test7 type:kotlin.Long visibility:public [final,static] ' type=kotlin.Long origin=null PROPERTY name:test8 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test8 type:IrErrorType visibility:public [final,static] + FIELD PROPERTY_BACKING_FIELD name:test8 type:kotlin.Long visibility:public [final,static] EXPRESSION_BODY - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Long type=kotlin.Long value=1 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:IrErrorType + CALL 'public final fun unaryMinus (): kotlin.Long declared in kotlin.Long' type=kotlin.Long origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Long correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [val] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Long declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:kotlin.Long visibility:public [final,static] ' type=kotlin.Long origin=null PROPERTY name:test9 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.Double visibility:public [final,static] EXPRESSION_BODY @@ -83,15 +81,14 @@ FILE fqName: fileName:/literals.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Double declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.Double visibility:public [final,static] ' type=kotlin.Double origin=null PROPERTY name:test10 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test10 type:IrErrorType visibility:public [final,static] + FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Double visibility:public [final,static] EXPRESSION_BODY - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Double type=kotlin.Double value=1.0 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:IrErrorType + CALL 'public final fun unaryMinus (): kotlin.Double declared in kotlin.Double' type=kotlin.Double origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Double correspondingProperty: PROPERTY name:test10 visibility:public modality:FINAL [val] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test10 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Double declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Double visibility:public [final,static] ' type=kotlin.Double origin=null PROPERTY name:test11 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test11 type:kotlin.Float visibility:public [final,static] EXPRESSION_BODY @@ -102,15 +99,14 @@ FILE fqName: fileName:/literals.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Float declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test11 type:kotlin.Float visibility:public [final,static] ' type=kotlin.Float origin=null PROPERTY name:test12 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test12 type:IrErrorType visibility:public [final,static] + FIELD PROPERTY_BACKING_FIELD name:test12 type:kotlin.Float visibility:public [final,static] EXPRESSION_BODY - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Float type=kotlin.Float value=1.0 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:IrErrorType + CALL 'public final fun unaryMinus (): kotlin.Float declared in kotlin.Float' type=kotlin.Float origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Float correspondingProperty: PROPERTY name:test12 visibility:public modality:FINAL [val] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test12 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Float declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test12 type:kotlin.Float visibility:public [final,static] ' type=kotlin.Float origin=null PROPERTY name:test13 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test13 type:kotlin.Char visibility:public [final,static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt index e3288410b5a..20bb0d6bfbe 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt @@ -19,8 +19,9 @@ FILE fqName: fileName:/objectReferenceInFieldInitializer.kt PROPERTY name:b visibility:private modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final] EXPRESSION_BODY - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - other: CALL 'private final fun (): kotlin.String declared in .A' type=kotlin.String origin=null + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="1234" + CALL 'private final fun (): kotlin.String declared in .A' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A) returnType:kotlin.String correspondingProperty: PROPERTY name:b visibility:private modality:FINAL [val] $this: VALUE_PARAMETER name: type:.A diff --git a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.fir.txt b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.fir.txt index 9029082ab59..45187e0aa97 100644 --- a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.fir.txt +++ b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.fir.txt @@ -62,8 +62,7 @@ FILE fqName: fileName:/primitivesImplicitConversions.kt VAR name:test3 type:kotlin.Long? [val] CONST Int type=kotlin.Long? value=42 VAR name:test4 type:kotlin.Long? [val] - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=1 + CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null VAR name:test5 type:kotlin.Long? [val] CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null VAR name:test6 type:kotlin.Short? [val] diff --git a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.fir.txt b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.fir.txt index 9da150f0728..f49238dda8d 100644 --- a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.fir.txt +++ b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.fir.txt @@ -1,34 +1,28 @@ FILE fqName: fileName:/simpleUnaryOperators.kt - FUN name:test1 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:IrErrorType + FUN name:test1 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.Int VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (x: kotlin.Int): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Int declared in .test1' type=kotlin.Int origin=null - FUN name:test2 visibility:public modality:FINAL <> () returnType:IrErrorType + RETURN type=kotlin.Nothing from='public final fun test1 (x: kotlin.Int): kotlin.Int declared in ' + CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=42 - FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:IrErrorType + RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Int declared in ' + CALL 'public final fun unaryMinus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.Int VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Int): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null - FUN name:test4 visibility:public modality:FINAL <> () returnType:IrErrorType + RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Int): kotlin.Int declared in ' + CALL 'public final fun unaryPlus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=42 - FUN name:test5 visibility:public modality:FINAL <> (x:kotlin.Boolean) returnType:IrErrorType + RETURN type=kotlin.Nothing from='public final fun test4 (): kotlin.Int declared in ' + CALL 'public final fun unaryPlus (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + FUN name:test5 visibility:public modality:FINAL <> (x:kotlin.Boolean) returnType:kotlin.Boolean VALUE_PARAMETER name:x index:0 type:kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test5 (x: kotlin.Boolean): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Boolean declared in .test5' type=kotlin.Boolean origin=null - FUN name:test6 visibility:public modality:FINAL <> () returnType:IrErrorType + RETURN type=kotlin.Nothing from='public final fun test5 (x: kotlin.Boolean): kotlin.Boolean declared in ' + CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=null + FUN name:test6 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test6 (): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Boolean type=kotlin.Boolean value=true + RETURN type=kotlin.Nothing from='public final fun test6 (): kotlin.Boolean declared in ' + CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=null diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt index a9e66483e8c..95cd19bb3f5 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt @@ -19,8 +19,9 @@ FILE fqName: fileName:/coercionInLoop.kt GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null arg1: ERROR_CALL 'Unresolved reference: #' type=IrErrorType then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - other: GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Fail " + GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null VAR name: type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null ERROR_CALL 'Unresolved reference: R|/i|' type=IrErrorType diff --git a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt index 0f911631a08..2838e93b07e 100644 --- a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt +++ b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/javaConstructorWithTypeParameters.kt FUN name:test2 visibility:public modality:FINAL <> () returnType:.J1 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): .J1 declared in ' - CONSTRUCTOR_CALL 'public constructor (x1: IrErrorType) declared in .J1' type=.J1 origin=null + CONSTRUCTOR_CALL 'public constructor (x1: X1 of ?) declared in .J1' type=.J1 origin=null FUN name:test3 visibility:public modality:FINAL <> (j1:.J1) returnType:IrErrorType VALUE_PARAMETER name:j1 index:0 type:.J1 BLOCK_BODY diff --git a/compiler/testData/ir/irText/types/kt30796.fir.txt b/compiler/testData/ir/irText/types/kt30796.fir.txt new file mode 100644 index 00000000000..0ed29c3cb3e --- /dev/null +++ b/compiler/testData/ir/irText/types/kt30796.fir.txt @@ -0,0 +1,37 @@ +FILE fqName: fileName:/kt30796.kt + FUN name:testElvis1 visibility:public modality:FINAL (value:T of .testElvis1) returnType:kotlin.Any + TYPE_PARAMETER name:T index:0 variance: superTypes:[] + VALUE_PARAMETER name:value index:0 type:T of .testElvis1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun testElvis1 (value: T of .testElvis1): kotlin.Any declared in ' + BLOCK type=kotlin.Any origin=ELVIS + VAR name: type:T of .testElvis1 [val] + GET_VAR 'value: T of .testElvis1 declared in .testElvis1' type=T of .testElvis1 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 .testElvis1 [val] declared in .testElvis1' type=T of .testElvis1 origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Int type=kotlin.Any value=42 + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: GET_VAR 'val : T of .testElvis1 [val] declared in .testElvis1' type=T of .testElvis1 origin=null + FUN name:testElvis2 visibility:public modality:FINAL (value:T of .testElvis2) returnType:kotlin.Any + TYPE_PARAMETER name:T index:0 variance: superTypes:[] + VALUE_PARAMETER name:value index:0 type:T of .testElvis2 + BLOCK_BODY + VAR name:a type:kotlin.Int [val] + BLOCK type=kotlin.Int origin=ELVIS + VAR name: type:T of .testElvis2 [val] + GET_VAR 'value: T of .testElvis2 declared in .testElvis2' type=T of .testElvis2 origin=null + WHEN type=kotlin.Int 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 .testElvis2 [val] declared in .testElvis2' type=T of .testElvis2 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 .testElvis2 [val] declared in .testElvis2' type=T of .testElvis2 origin=null + RETURN type=kotlin.Nothing from='public final fun testElvis2 (value: T of .testElvis2): kotlin.Any declared in ' + GET_VAR 'val a: kotlin.Int [val] declared in .testElvis2' type=kotlin.Int origin=null