diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt index 5b8d2c88540..e80677c6094 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt @@ -377,7 +377,7 @@ class RenderIrElementVisitor : IrElementVisitor { DECLARATION_RENDERER.renderDescriptor(this.descriptor) internal fun DeclarationDescriptor.ref(): String = - REFERENCE_RENDERER.renderDescriptor(this) + REFERENCE_RENDERER.renderDescriptor(this.original) internal fun KotlinType.render(): String = DECLARATION_RENDERER.renderType(this) diff --git a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt index e51a7979156..64a19fa61b3 100644 --- a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt +++ b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt @@ -37,7 +37,7 @@ FILE fqName: fileName:/delegatingConstructorCallToTypeAliasConstructor.kt $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:C1 flags: CONSTRUCTOR visibility:public <> () returnType:C1 flags:primary BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(String)' + DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(T)' : kotlin.String value: CONST String type=kotlin.String value="O" INSTANCE_INITIALIZER_CALL classDescriptor='C1' @@ -64,7 +64,7 @@ FILE fqName: fileName:/delegatingConstructorCallToTypeAliasConstructor.kt $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:C2 flags: CONSTRUCTOR visibility:public <> () returnType:C2 flags:primary BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(String)' + DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(T)' : kotlin.String value: CONST String type=kotlin.String value="K" INSTANCE_INITIALIZER_CALL classDescriptor='C2' diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt index a99f4c0d2cf..7756ee04c21 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt @@ -20,7 +20,7 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt annotations: CALL 'constructor Ann()' type=Ann origin=null EXPRESSION_BODY - CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy origin=null + CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: @@ -32,7 +32,7 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:delegated,val BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on Lazy: T' type=kotlin.Int origin=null : kotlin.Int $receiver: GET_FIELD '`test1$delegate`: Lazy' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt index 7221f4ae279..f0a10cacc0f 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt @@ -35,7 +35,7 @@ FILE fqName: fileName:/localDelegatedPropertiesWithAnnotations.kt CALL 'constructor A(String)' type=A origin=null x: CONST String type=kotlin.String value="foo/test" VAR DELEGATE name:test$delegate type:kotlin.Lazy flags:val - CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy origin=null + CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: @@ -46,7 +46,7 @@ FILE fqName: fileName:/localDelegatedPropertiesWithAnnotations.kt FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on Lazy: T' type=kotlin.Int origin=null : kotlin.Int $receiver: GET_VAR '`test$delegate`: Lazy' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.txt index e7f220fc3b4..01e95ab5a7f 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.txt @@ -94,7 +94,7 @@ FILE fqName: fileName:/classLevelProperties.kt PROPERTY name:test7 visibility:public modality:FINAL flags:delegated,val FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private flags:final EXPRESSION_BODY - CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy origin=null + CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: @@ -107,7 +107,7 @@ FILE fqName: fileName:/classLevelProperties.kt $this: VALUE_PARAMETER name: type:C flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on Lazy: T' type=kotlin.Int origin=null : kotlin.Int $receiver: GET_FIELD '`test7$delegate`: Lazy' type=kotlin.Lazy origin=null receiver: GET_VAR 'this@C: C' type=C origin=null @@ -116,7 +116,7 @@ FILE fqName: fileName:/classLevelProperties.kt PROPERTY name:test8 visibility:public modality:FINAL flags:delegated,var FIELD DELEGATE name:test8$delegate type:kotlin.collections.HashMap /* = java.util.HashMap */ visibility:private flags:final EXPRESSION_BODY - CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null : kotlin.String : kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:C) returnType:kotlin.Int flags: @@ -124,7 +124,7 @@ FILE fqName: fileName:/classLevelProperties.kt $this: VALUE_PARAMETER name: type:C flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on MutableMap: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Int origin=null : kotlin.Int : kotlin.Int $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null @@ -137,7 +137,7 @@ FILE fqName: fileName:/classLevelProperties.kt VALUE_PARAMETER name: index:0 type:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(Int): Unit' - CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap: Unit' type=kotlin.Unit origin=null + CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Int $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null receiver: GET_VAR 'this@C: C' type=C origin=null diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.txt index 6c4ae46505b..fc48d4e2e30 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/delegatedProperties.kt PROPERTY name:test1 visibility:public modality:FINAL flags:delegated,val FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private flags:final,static EXPRESSION_BODY - CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy origin=null + CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: @@ -14,7 +14,7 @@ FILE fqName: fileName:/delegatedProperties.kt correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:delegated,val BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on Lazy: T' type=kotlin.Int origin=null : kotlin.Int $receiver: GET_FIELD '`test1$delegate`: Lazy' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null @@ -40,7 +40,7 @@ FILE fqName: fileName:/delegatedProperties.kt PROPERTY name:test2 visibility:public modality:FINAL flags:delegated,val FIELD DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private flags:final EXPRESSION_BODY - CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy origin=null + CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: @@ -53,7 +53,7 @@ FILE fqName: fileName:/delegatedProperties.kt $this: VALUE_PARAMETER name: type:C flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on Lazy: T' type=kotlin.Int origin=null : kotlin.Int $receiver: GET_FIELD '`test2$delegate`: Lazy' type=kotlin.Lazy origin=null receiver: GET_VAR 'this@C: C' type=C origin=null @@ -69,7 +69,7 @@ FILE fqName: fileName:/delegatedProperties.kt $this: VALUE_PARAMETER name: type:C flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Any' - CALL 'getValue(Any?, KProperty<*>) on MutableMap: Any' type=kotlin.Any origin=null + CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Any origin=null : kotlin.Any : kotlin.Any $receiver: GET_FIELD '`test3$delegate`: MutableMap' type=kotlin.collections.MutableMap origin=null @@ -82,7 +82,7 @@ FILE fqName: fileName:/delegatedProperties.kt VALUE_PARAMETER name: index:0 type:kotlin.Any flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(Any): Unit' - CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap: Unit' type=kotlin.Unit origin=null + CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Any $receiver: GET_FIELD '`test3$delegate`: MutableMap' type=kotlin.collections.MutableMap origin=null receiver: GET_VAR 'this@C: C' type=C origin=null @@ -105,14 +105,14 @@ FILE fqName: fileName:/delegatedProperties.kt PROPERTY name:test4 visibility:public modality:FINAL flags:delegated,var FIELD DELEGATE name:test4$delegate type:kotlin.collections.HashMap /* = java.util.HashMap */ visibility:private flags:final,static EXPRESSION_BODY - CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null : kotlin.String : kotlin.Any FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Any flags: correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL flags:delegated,var BLOCK_BODY RETURN type=kotlin.Nothing from='(): Any' - CALL 'getValue(Any?, KProperty<*>) on MutableMap: Any' type=kotlin.Any origin=null + CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Any origin=null : kotlin.Any : kotlin.Any $receiver: GET_FIELD '`test4$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null @@ -123,10 +123,9 @@ FILE fqName: fileName:/delegatedProperties.kt VALUE_PARAMETER name: index:0 type:kotlin.Any flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(Any): Unit' - CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap: Unit' type=kotlin.Unit origin=null + CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Any $receiver: GET_FIELD '`test4$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'test4: Any' field=null getter='(): Any' setter='(Any): Unit' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR 'value-parameter : Any' type=kotlin.Any origin=null - diff --git a/compiler/testData/ir/irText/declarations/kt27005.txt b/compiler/testData/ir/irText/declarations/kt27005.txt index cbab1a14b34..abd4e50dc46 100644 --- a/compiler/testData/ir/irText/declarations/kt27005.txt +++ b/compiler/testData/ir/irText/declarations/kt27005.txt @@ -2,12 +2,12 @@ FILE fqName: fileName:/kt27005.kt FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:suspend BLOCK_BODY RETURN type=kotlin.Nothing from='foo(): Unit' - CALL 'baz(): Unit' type=kotlin.Unit origin=null + CALL 'baz(): T' type=kotlin.Unit origin=null : kotlin.Unit FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Any flags:suspend BLOCK_BODY RETURN type=kotlin.Nothing from='bar(): Any' - CALL 'baz(): Any' type=kotlin.Any origin=null + CALL 'baz(): T' type=kotlin.Any origin=null : kotlin.Any FUN name:baz visibility:public modality:FINAL () returnType:T flags:suspend TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt index cc338ad3b9d..965a03d20d9 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt @@ -3,7 +3,7 @@ FILE fqName: fileName:/localDelegatedProperties.kt BLOCK_BODY LOCAL_DELEGATED_PROPERTY name:x type:kotlin.Int flags:val VAR DELEGATE name:x$delegate type:kotlin.Lazy flags:val - CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy origin=null + CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: @@ -14,7 +14,7 @@ FILE fqName: fileName:/localDelegatedProperties.kt FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on Lazy: T' type=kotlin.Int origin=null : kotlin.Int $receiver: GET_VAR '`x$delegate`: Lazy' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null @@ -25,13 +25,13 @@ FILE fqName: fileName:/localDelegatedProperties.kt BLOCK_BODY LOCAL_DELEGATED_PROPERTY name:x type:kotlin.Int flags:var VAR DELEGATE name:x$delegate type:kotlin.collections.HashMap /* = java.util.HashMap */ flags:val - CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null : kotlin.String : kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on MutableMap: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Int origin=null : kotlin.Int : kotlin.Int $receiver: GET_VAR '`x$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null @@ -41,7 +41,7 @@ FILE fqName: fileName:/localDelegatedProperties.kt VALUE_PARAMETER name:value index:0 type:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(Int): Unit' - CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap: Unit' type=kotlin.Unit origin=null + CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Int $receiver: GET_VAR '`x$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null thisRef: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.txt index 99d1fa02996..4bb42ba2a75 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.txt @@ -71,7 +71,7 @@ FILE fqName: fileName:/packageLevelProperties.kt PROPERTY name:test7 visibility:public modality:FINAL flags:delegated,val FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private flags:final,static EXPRESSION_BODY - CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy origin=null + CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: @@ -83,7 +83,7 @@ FILE fqName: fileName:/packageLevelProperties.kt correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL flags:delegated,val BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on Lazy: T' type=kotlin.Int origin=null : kotlin.Int $receiver: GET_FIELD '`test7$delegate`: Lazy' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null @@ -91,14 +91,14 @@ FILE fqName: fileName:/packageLevelProperties.kt PROPERTY name:test8 visibility:public modality:FINAL flags:delegated,var FIELD DELEGATE name:test8$delegate type:kotlin.collections.HashMap /* = java.util.HashMap */ visibility:private flags:final,static EXPRESSION_BODY - CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null : kotlin.String : kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int flags: correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL flags:delegated,var BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' - CALL 'getValue(Any?, KProperty<*>) on MutableMap: Int' type=kotlin.Int origin=null + CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Int origin=null : kotlin.Int : kotlin.Int $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null @@ -109,7 +109,7 @@ FILE fqName: fileName:/packageLevelProperties.kt VALUE_PARAMETER name: index:0 type:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(Int): Unit' - CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap: Unit' type=kotlin.Unit origin=null + CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Int $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null thisRef: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt index 0a8a8b5dd3b..5e400b4befc 100644 --- a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt +++ b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt @@ -46,11 +46,11 @@ FILE fqName: fileName:/delegatedMembers.kt VALUE_PARAMETER name:t index:0 type:TT flags: VALUE_PARAMETER name:x index:1 type:X flags: BLOCK_BODY - CALL 'qux(TT, X): Unit' type=kotlin.Unit origin=null + CALL 'qux(T, X): Unit' type=kotlin.Unit origin=null : X $this: GET_FIELD '`Test$IBase$delegate`: IBase' type=IBase origin=null receiver: GET_VAR 'this@Test: Test' type=Test origin=null - t: GET_VAR 'value-parameter t: TT' type=TT origin=null + t: GET_VAR 'value-parameter t: T' type=TT origin=null x: GET_VAR 'value-parameter x: X' type=X origin=null FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:Test, x:kotlin.Int) returnType:kotlin.Unit flags: overridden: diff --git a/compiler/testData/ir/irText/expressions/argumentMappedWithError.txt b/compiler/testData/ir/irText/expressions/argumentMappedWithError.txt index 353f763f563..0b0c7200e03 100644 --- a/compiler/testData/ir/irText/expressions/argumentMappedWithError.txt +++ b/compiler/testData/ir/irText/expressions/argumentMappedWithError.txt @@ -14,7 +14,7 @@ FILE fqName: fileName:/argumentMappedWithError.kt VAR name:x type:kotlin.Int flags:val CONST Int type=kotlin.Int value=0 CALL 'foo(Number): Unit' type=kotlin.Unit origin=null - arg: CALL 'convert() on Number: Number' type=kotlin.Number origin=null + arg: CALL 'convert() on Number: R' type=kotlin.Number origin=null : kotlin.Number $receiver: GET_VAR 'x: Int' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt index e273e2a9d9c..37883583b3e 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt @@ -47,7 +47,7 @@ FILE fqName: fileName:/augmentedAssignmentWithExpression.kt VALUE_PARAMETER name:a index:0 type:() -> Host flags: BLOCK_BODY CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ - $this: CALL 'invoke(): Host' type=Host origin=INVOKE + $this: CALL 'invoke(): R' type=Host origin=INVOKE $this: GET_VAR 'value-parameter a: () -> Host' type=() -> Host origin=VARIABLE_AS_FUNCTION x: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt index 54c2d591cb7..787628c7536 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt @@ -45,7 +45,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt body: BLOCK type=kotlin.Unit origin=null BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp1_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: BLOCK type=kotlin.collections.List origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp0_elvis_lhs type:kotlin.collections.List? flags:val GET_VAR 'value-parameter ss: List?' type=kotlin.collections.List? origin=null @@ -63,7 +63,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator origin=null FUN name:test4 visibility:public modality:FINAL <> (ss:kotlin.collections.List?) returnType:kotlin.Unit flags: VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List? flags: @@ -73,7 +73,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt body: BLOCK type=kotlin.Unit origin=null BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp1_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: BLOCK type=kotlin.collections.List origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp0_elvis_lhs type:kotlin.collections.List? flags:val GET_VAR 'value-parameter ss: List?' type=kotlin.collections.List? origin=null @@ -91,7 +91,7 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator origin=null FUN name:test5 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt b/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt index 48ead9a3164..0b2d043f438 100644 --- a/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt +++ b/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt @@ -34,7 +34,7 @@ FILE fqName: fileName:/callableReferenceTypeArguments.kt PROPERTY name:test1 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test1 type:(kotlin.Int) -> kotlin.Unit visibility:public flags:final,static EXPRESSION_BODY - FUNCTION_REFERENCE 'topLevel1(Int): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.Int, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'topLevel1(T): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.Int, kotlin.Unit> origin=null : kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.Int) -> kotlin.Unit flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val @@ -44,7 +44,7 @@ FILE fqName: fileName:/callableReferenceTypeArguments.kt PROPERTY name:test2 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test2 type:(kotlin.collections.List) -> kotlin.Unit visibility:public flags:final,static EXPRESSION_BODY - FUNCTION_REFERENCE 'topLevel2(List): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.collections.List, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'topLevel2(List): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.collections.List, kotlin.Unit> origin=null : kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.collections.List) -> kotlin.Unit flags: correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:val @@ -54,7 +54,7 @@ FILE fqName: fileName:/callableReferenceTypeArguments.kt PROPERTY name:test3 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test3 type:(kotlin.Int) -> kotlin.Unit visibility:public flags:final,static EXPRESSION_BODY - FUNCTION_REFERENCE 'objectMember(Int): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.Int, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'objectMember(T): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.Int, kotlin.Unit> origin=null : kotlin.Int $this: GET_OBJECT 'Host' type=Host FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.Int) -> kotlin.Unit flags: diff --git a/compiler/testData/ir/irText/expressions/catchParameterAccess.txt b/compiler/testData/ir/irText/expressions/catchParameterAccess.txt index a92367d08ea..59cb2b521a6 100644 --- a/compiler/testData/ir/irText/expressions/catchParameterAccess.txt +++ b/compiler/testData/ir/irText/expressions/catchParameterAccess.txt @@ -5,7 +5,7 @@ FILE fqName: fileName:/catchParameterAccess.kt RETURN type=kotlin.Nothing from='test(() -> Unit): Unit' TRY type=kotlin.Unit try: BLOCK type=kotlin.Unit origin=null - CALL 'invoke(): Unit' type=kotlin.Unit origin=INVOKE + CALL 'invoke(): R' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION CATCH parameter=e: Exception /* = Exception */ VAR CATCH_PARAMETER name:e type:kotlin.Exception /* = java.lang.Exception */ flags:val diff --git a/compiler/testData/ir/irText/expressions/classReference.txt b/compiler/testData/ir/irText/expressions/classReference.txt index 9060ffb868b..81764466155 100644 --- a/compiler/testData/ir/irText/expressions/classReference.txt +++ b/compiler/testData/ir/irText/expressions/classReference.txt @@ -29,12 +29,12 @@ FILE fqName: fileName:/classReference.kt CALL 'constructor A()' type=A origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] - CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY + CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY <`0>: A $receiver: CLASS_REFERENCE 'A' type=kotlin.reflect.KClass TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] - CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY + CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY <`0>: A $receiver: GET_CLASS type=kotlin.reflect.KClass CALL 'constructor A()' type=A origin=null diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.txt index ea1030eafe3..4085665ad24 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.txt @@ -20,7 +20,7 @@ FILE fqName: fileName:/coercionToUnit.kt BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] - CALL 'add(String): Boolean' type=kotlin.Boolean origin=null + CALL 'add(E): Boolean' type=kotlin.Boolean origin=null $this: GET_VAR 'value-parameter mc: MutableCollection' type=kotlin.collections.MutableCollection origin=null element: CONST String type=kotlin.String value="" FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt index 001317353f0..d85ad5bf4d4 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt @@ -142,6 +142,6 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='box(): String' - CALL 'invoke(): String' type=kotlin.String origin=INVOKE + CALL 'invoke(): R' type=kotlin.String origin=INVOKE $this: CALL '(): () -> String' type=() -> kotlin.String origin=GET_PROPERTY $this: GET_ENUM 'B' type=X diff --git a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt index e9b55928999..5f5602d20a1 100644 --- a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt +++ b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/extFunInvokeAsFun.kt VALUE_PARAMETER name:block index:1 type:kotlin.Any?.() -> kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='with1(Any?, Any?.() -> Unit): Unit' - CALL 'invoke(Any?): Unit' type=kotlin.Unit origin=INVOKE + CALL 'invoke(P1): R' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:kotlin.Any?.() -> kotlin.Unit) returnType:kotlin.Unit flags: @@ -12,7 +12,7 @@ FILE fqName: fileName:/extFunInvokeAsFun.kt VALUE_PARAMETER name:block index:1 type:kotlin.Any?.() -> kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='with2(Any?, Any?.() -> Unit): Unit' - CALL 'invoke(Any?): Unit' type=kotlin.Unit origin=INVOKE + CALL 'invoke(P1): R' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt index ba8032c41f6..0ee186f94d6 100644 --- a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt +++ b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt @@ -15,7 +15,7 @@ FILE fqName: fileName:/extFunSafeInvoke.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'invoke(Any, Int, String): Unit' type=kotlin.Unit origin=INVOKE + then: CALL 'invoke(P1, P2, P3): R' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'value-parameter fn: Any.(Int, String) -> Unit' type=kotlin.Any.(kotlin.Int, kotlin.String) -> kotlin.Unit origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null p2: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/for.txt b/compiler/testData/ir/irText/expressions/for.txt index 5fc463b258a..50f8fd9c568 100644 --- a/compiler/testData/ir/irText/expressions/for.txt +++ b/compiler/testData/ir/irText/expressions/for.txt @@ -4,28 +4,28 @@ FILE fqName: fileName:/for.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null FUN name:testIterable visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit flags: VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List flags: BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null BLOCK type=kotlin.Unit origin=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null @@ -35,20 +35,20 @@ FILE fqName: fileName:/for.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.Iterator> flags:val - CALL 'iterator(): Iterator>' type=kotlin.collections.Iterator> origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator> origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter pp: List>' type=kotlin.collections.List> origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp0_iterator: Iterator>' type=kotlin.collections.Iterator> origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_IMPLICIT_VARIABLE name:tmp1_loop_parameter type:kotlin.Pair flags:val - CALL 'next(): Pair' type=kotlin.Pair origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.Pair origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp0_iterator: Iterator>' type=kotlin.collections.Iterator> origin=null VAR name:i type:kotlin.Int flags:val - CALL 'component1(): Int' type=kotlin.Int origin=COMPONENT_N(index=1) + CALL 'component1(): A' type=kotlin.Int origin=COMPONENT_N(index=1) $this: GET_VAR 'tmp1_loop_parameter: Pair' type=kotlin.Pair origin=null VAR name:s type:kotlin.String flags:val - CALL 'component2(): String' type=kotlin.String origin=COMPONENT_N(index=2) + CALL 'component2(): B' type=kotlin.String origin=COMPONENT_N(index=2) $this: GET_VAR 'tmp1_loop_parameter: Pair' type=kotlin.Pair origin=null BLOCK type=kotlin.Unit origin=null CALL 'println(Int): Unit' type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt b/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt index 8e790ed764d..b9a38df981d 100644 --- a/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt +++ b/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt @@ -4,14 +4,14 @@ FILE fqName: fileName:/forWithBreakContinue.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null BLOCK type=kotlin.Nothing origin=null BREAK label=null loop.label=null @@ -20,26 +20,26 @@ FILE fqName: fileName:/forWithBreakContinue.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List origin=null WHILE label=OUTER origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s1 type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null BLOCK type=kotlin.Nothing origin=null BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp1_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List origin=null WHILE label=INNER origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s2 type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator origin=null BLOCK type=kotlin.Nothing origin=null BREAK label=OUTER loop.label=OUTER @@ -51,14 +51,14 @@ FILE fqName: fileName:/forWithBreakContinue.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null BLOCK type=kotlin.Nothing origin=null CONTINUE label=null loop.label=null @@ -67,26 +67,26 @@ FILE fqName: fileName:/forWithBreakContinue.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List origin=null WHILE label=OUTER origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s1 type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator origin=null BLOCK type=kotlin.Nothing origin=null BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp1_iterator type:kotlin.collections.Iterator flags:val - CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR + CALL 'iterator(): Iterator' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List origin=null WHILE label=INNER origin=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE VAR FOR_LOOP_VARIABLE name:s2 type:kotlin.String flags:val - CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT + CALL 'next(): T' type=kotlin.String origin=FOR_LOOP_NEXT $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator origin=null BLOCK type=kotlin.Nothing origin=null CONTINUE label=OUTER loop.label=OUTER diff --git a/compiler/testData/ir/irText/expressions/genericPropertyCall.txt b/compiler/testData/ir/irText/expressions/genericPropertyCall.txt index ea93bec81df..118285c4250 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyCall.txt +++ b/compiler/testData/ir/irText/expressions/genericPropertyCall.txt @@ -10,7 +10,7 @@ FILE fqName: fileName:/genericPropertyCall.kt PROPERTY name:test visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CALL '() on String: String' type=kotlin.String origin=GET_PROPERTY + CALL '() on T: T' type=kotlin.String origin=GET_PROPERTY <`0>: kotlin.String $receiver: CONST String type=kotlin.String value="abc" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.txt index 46d27484233..6cdea2de7bf 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.txt @@ -74,7 +74,7 @@ FILE fqName: fileName:/implicitCastToNonNull.kt arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: GET_VAR 'value-parameter x: T' type=T origin=null arg1: CONST Null type=kotlin.Nothing? value=null - then: CALL 'invoke(S): Unit' type=kotlin.Unit origin=INVOKE + then: CALL 'invoke(P1): R' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'value-parameter fn: (S) -> Unit' type=(S) -> kotlin.Unit origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'value-parameter x: T' type=T origin=null diff --git a/compiler/testData/ir/irText/expressions/in.txt b/compiler/testData/ir/irText/expressions/in.txt index 581f4d2174e..22d7a8179f0 100644 --- a/compiler/testData/ir/irText/expressions/in.txt +++ b/compiler/testData/ir/irText/expressions/in.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/in.kt VALUE_PARAMETER name:x index:1 type:kotlin.collections.Collection flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test1(Any, Collection): Boolean' - CALL 'contains(Any): Boolean' type=kotlin.Boolean origin=IN + CALL 'contains(E): Boolean' type=kotlin.Boolean origin=IN $this: GET_VAR 'value-parameter x: Collection' type=kotlin.collections.Collection origin=null element: GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any, x:kotlin.collections.Collection) returnType:kotlin.Boolean flags: @@ -13,7 +13,7 @@ FILE fqName: fileName:/in.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test2(Any, Collection): Boolean' CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=NOT_IN - arg0: CALL 'contains(Any): Boolean' type=kotlin.Boolean origin=NOT_IN + arg0: CALL 'contains(E): Boolean' type=kotlin.Boolean origin=NOT_IN $this: GET_VAR 'value-parameter x: Collection' type=kotlin.collections.Collection origin=null element: GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null FUN name:test3 visibility:public modality:FINAL (a:T, x:kotlin.collections.Collection) returnType:kotlin.Boolean flags: @@ -22,7 +22,7 @@ FILE fqName: fileName:/in.kt VALUE_PARAMETER name:x index:1 type:kotlin.collections.Collection flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test3(T, Collection): Boolean' - CALL 'contains(T): Boolean' type=kotlin.Boolean origin=IN + CALL 'contains(E): Boolean' type=kotlin.Boolean origin=IN $this: GET_VAR 'value-parameter x: Collection' type=kotlin.collections.Collection origin=null element: GET_VAR 'value-parameter a: T' type=T origin=null FUN name:test4 visibility:public modality:FINAL (a:T, x:kotlin.collections.Collection) returnType:kotlin.Boolean flags: @@ -32,7 +32,7 @@ FILE fqName: fileName:/in.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test4(T, Collection): Boolean' CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=NOT_IN - arg0: CALL 'contains(T): Boolean' type=kotlin.Boolean origin=NOT_IN + arg0: CALL 'contains(E): Boolean' type=kotlin.Boolean origin=NOT_IN $this: GET_VAR 'value-parameter x: Collection' type=kotlin.collections.Collection origin=null element: GET_VAR 'value-parameter a: T' type=T origin=null diff --git a/compiler/testData/ir/irText/expressions/objectClassReference.txt b/compiler/testData/ir/irText/expressions/objectClassReference.txt index 99426cc6bbf..f4c3e866a4d 100644 --- a/compiler/testData/ir/irText/expressions/objectClassReference.txt +++ b/compiler/testData/ir/irText/expressions/objectClassReference.txt @@ -25,7 +25,7 @@ FILE fqName: fileName:/objectClassReference.kt CLASS_REFERENCE 'A' type=kotlin.reflect.KClass TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] - CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY + CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY <`0>: A $receiver: CLASS_REFERENCE 'A' type=kotlin.reflect.KClass diff --git a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt index 467ca9c6019..a53084519a2 100644 --- a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt +++ b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt @@ -35,7 +35,7 @@ FILE fqName: fileName:/specializedTypeAliasConstructorCall.kt FUN name:test visibility:public modality:FINAL <> () returnType:IntAlias /* = Cell */ flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test(): IntAlias /* = Cell */' - CALL 'constructor Cell(Int)' type=Cell origin=null + CALL 'constructor Cell(T)' type=Cell origin=null : kotlin.Int value: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.txt b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.txt index 51bf90de891..0e5ad1db09d 100644 --- a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.txt +++ b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.txt @@ -80,7 +80,7 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt FIELD PROPERTY_BACKING_FIELD name:xx type:kotlin.Int visibility:public flags:final EXPRESSION_BODY CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS - $this: CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY + $this: CALL '(): T' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'this@test: Outer' type=Outer origin=null other: CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'this@: ' type=test. origin=null diff --git a/compiler/testData/ir/irText/expressions/useImportedMember.txt b/compiler/testData/ir/irText/expressions/useImportedMember.txt index 87952b489a6..3252f572245 100644 --- a/compiler/testData/ir/irText/expressions/useImportedMember.txt +++ b/compiler/testData/ir/irText/expressions/useImportedMember.txt @@ -225,7 +225,7 @@ FILE fqName: fileName:/useImportedMember.kt BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'g1(String): String' type=kotlin.String origin=null + arg0: CALL 'g1(T): T' type=kotlin.String origin=null : kotlin.String $this: GET_OBJECT 'C' type=C t: CONST String type=kotlin.String value="7" @@ -236,7 +236,7 @@ FILE fqName: fileName:/useImportedMember.kt BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL '() on String: String' type=kotlin.String origin=GET_PROPERTY + arg0: CALL '() on T: T' type=kotlin.String origin=GET_PROPERTY <`0>: kotlin.String $this: GET_OBJECT 'C' type=C $receiver: CONST String type=kotlin.String value="8" @@ -247,7 +247,7 @@ FILE fqName: fileName:/useImportedMember.kt BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'fromInterface() on Int: Int' type=kotlin.Int origin=null + arg0: CALL 'fromInterface() on T: T' type=kotlin.Int origin=null : kotlin.Int $this: GET_OBJECT 'C' type=C $receiver: CONST Int type=kotlin.Int value=9 @@ -258,7 +258,7 @@ FILE fqName: fileName:/useImportedMember.kt BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL '() on String: String' type=kotlin.String origin=GET_PROPERTY + arg0: CALL '() on T: T' type=kotlin.String origin=GET_PROPERTY <`0>: kotlin.String $this: GET_OBJECT 'C' type=C $receiver: CONST String type=kotlin.String value="10" diff --git a/compiler/testData/ir/irText/expressions/vararg.txt b/compiler/testData/ir/irText/expressions/vararg.txt index 92c2eeccfb7..1a6eb669d7d 100644 --- a/compiler/testData/ir/irText/expressions/vararg.txt +++ b/compiler/testData/ir/irText/expressions/vararg.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/vararg.kt PROPERTY name:test1 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Array visibility:public flags:final,static EXPRESSION_BODY - CALL 'arrayOf(vararg String): Array' type=kotlin.Array origin=null + CALL 'arrayOf(vararg T): Array' type=kotlin.Array origin=null : kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Array flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val @@ -12,7 +12,7 @@ FILE fqName: fileName:/vararg.kt PROPERTY name:test2 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Array visibility:public flags:final,static EXPRESSION_BODY - CALL 'arrayOf(vararg String): Array' type=kotlin.Array origin=null + CALL 'arrayOf(vararg T): Array' type=kotlin.Array origin=null : kotlin.String elements: VARARG type=kotlin.Array varargElementType=kotlin.String CONST String type=kotlin.String value="1" @@ -26,7 +26,7 @@ FILE fqName: fileName:/vararg.kt PROPERTY name:test3 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Array visibility:public flags:final,static EXPRESSION_BODY - CALL 'arrayOf(vararg String): Array' type=kotlin.Array origin=null + CALL 'arrayOf(vararg T): Array' type=kotlin.Array origin=null : kotlin.String elements: VARARG type=kotlin.Array varargElementType=kotlin.String CONST String type=kotlin.String value="0" diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt index 5e09a3e6d7a..cfad2c9c14e 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt @@ -13,19 +13,19 @@ FILE fqName: fileName:/variableAsFunctionCall.kt VALUE_PARAMETER name:f index:0 type:() -> kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test1(() -> Unit): Unit' - CALL 'invoke(): Unit' type=kotlin.Unit origin=INVOKE + CALL 'invoke(): R' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION FUN name:test2 visibility:public modality:FINAL <> (f:kotlin.String.() -> kotlin.Unit) returnType:kotlin.Unit flags: VALUE_PARAMETER name:f index:0 type:kotlin.String.() -> kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test2(String.() -> Unit): Unit' - CALL 'invoke(String): Unit' type=kotlin.Unit origin=INVOKE + CALL 'invoke(P1): R' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'value-parameter f: String.() -> Unit' type=kotlin.String.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION p1: CONST String type=kotlin.String value="hello" FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test3(): String' - CALL 'invoke(): String' type=kotlin.String origin=null + CALL 'invoke(): R' type=kotlin.String origin=null $this: CALL 'k() on String: () -> String' type=() -> kotlin.String origin=null $receiver: CONST String type=kotlin.String value="hello" FUN name:test4 visibility:public modality:FINAL <> (ns:kotlin.String?) returnType:kotlin.String? flags: @@ -55,6 +55,6 @@ FILE fqName: fileName:/variableAsFunctionCall.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'invoke(): String' type=kotlin.String origin=null + then: CALL 'invoke(): R' type=kotlin.String origin=null $this: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? origin=null diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.txt index 96183714b16..17e19ed7456 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.txt @@ -16,8 +16,8 @@ FILE fqName: fileName:/variableAsFunctionCallWithGenerics.kt VALUE_PARAMETER name:x index:0 type:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='testGeneric1(String): String' - CALL 'invoke(): String' type=kotlin.String origin=INVOKE - $this: CALL '() on String: () -> String' type=() -> kotlin.String origin=GET_PROPERTY + CALL 'invoke(): R' type=kotlin.String origin=INVOKE + $this: CALL '() on T: () -> T' type=() -> kotlin.String origin=GET_PROPERTY <`0>: kotlin.String $receiver: GET_VAR 'value-parameter x: String' type=kotlin.String origin=null PROPERTY name:kt26531Val visibility:public modality:FINAL flags:val @@ -36,7 +36,7 @@ FILE fqName: fileName:/variableAsFunctionCallWithGenerics.kt FUN name:kt26531 visibility:public modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='kt26531(): Int' - CALL 'invoke(): Int' type=kotlin.Int origin=INVOKE - $this: CALL '() on Int: () -> Int' type=() -> kotlin.Int origin=GET_PROPERTY + CALL 'invoke(): R' type=kotlin.Int origin=INVOKE + $this: CALL '() on T: () -> T' type=() -> kotlin.Int origin=GET_PROPERTY <`0>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=7 diff --git a/compiler/testData/ir/irText/expressions/when.txt b/compiler/testData/ir/irText/expressions/when.txt index cd63abf1bf2..29660a4ea1d 100644 --- a/compiler/testData/ir/irText/expressions/when.txt +++ b/compiler/testData/ir/irText/expressions/when.txt @@ -48,9 +48,9 @@ FILE fqName: fileName:/when.kt GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null then: CONST String type=kotlin.String value="!Number" BRANCH - if: CALL 'contains(Number) on Iterable: Boolean' type=kotlin.Boolean origin=IN + if: CALL 'contains(T) on Iterable: Boolean' type=kotlin.Boolean origin=IN : kotlin.Number - $receiver: CALL 'setOf(): Set' type=kotlin.collections.Set origin=null + $receiver: CALL 'setOf(): Set' type=kotlin.collections.Set origin=null : kotlin.Nothing element: TYPE_OP type=kotlin.Number origin=IMPLICIT_CAST typeOperand=kotlin.Number typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Number modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any; java.io.Serializable] @@ -85,9 +85,9 @@ FILE fqName: fileName:/when.kt GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null then: CONST String type=kotlin.String value="!Number" BRANCH - if: CALL 'contains(Number) on Iterable: Boolean' type=kotlin.Boolean origin=IN + if: CALL 'contains(T) on Iterable: Boolean' type=kotlin.Boolean origin=IN : kotlin.Number - $receiver: CALL 'setOf(): Set' type=kotlin.collections.Set origin=null + $receiver: CALL 'setOf(): Set' type=kotlin.collections.Set origin=null : kotlin.Nothing element: TYPE_OP type=kotlin.Number origin=IMPLICIT_CAST typeOperand=kotlin.Number typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Number modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any; java.io.Serializable] diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.txt index 8701eda478b..bf0c0a95824 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/extensionLambda.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test1(): Int' - CALL 'run(String.() -> Int) on String: Int' type=kotlin.Int origin=null + CALL 'run(T.() -> R) on T: R' type=kotlin.Int origin=null : kotlin.String : kotlin.Int $receiver: CONST String type=kotlin.String value="42" diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index b0f0449917f..ad029fd4730 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -87,7 +87,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] - CALL 'with(A, A.() -> Int): Int' type=kotlin.Int origin=null + CALL 'with(T, T.() -> R): R' type=kotlin.Int origin=null : A : kotlin.Int receiver: GET_OBJECT 'A' type=A @@ -96,7 +96,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt $receiver: VALUE_PARAMETER name: type:A flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on A: Int' - CALL 'with(IFoo, IFoo.() -> Int): Int' type=kotlin.Int origin=null + CALL 'with(T, T.() -> R): R' type=kotlin.Int origin=null : IFoo : kotlin.Int receiver: GET_VAR 'value-parameter fooImpl: IFoo' type=IFoo origin=null @@ -105,7 +105,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt $receiver: VALUE_PARAMETER name: type:IFoo flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on IFoo: Int' - CALL 'with(IInvoke, IInvoke.() -> Int): Int' type=kotlin.Int origin=null + CALL 'with(T, T.() -> R): R' type=kotlin.Int origin=null : IInvoke : kotlin.Int receiver: GET_VAR 'value-parameter invokeImpl: IInvoke' type=IInvoke origin=null diff --git a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt index cc9abf0541d..b8450ca4ee3 100644 --- a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt +++ b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt @@ -1,7 +1,7 @@ FILE fqName: fileName:/nonLocalReturn.kt FUN name:test0 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY - CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing origin=null + CALL 'run(() -> R): R' type=kotlin.Nothing origin=null : kotlin.Nothing block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags: @@ -11,7 +11,7 @@ FILE fqName: fileName:/nonLocalReturn.kt FUNCTION_REFERENCE '(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY - CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null + CALL 'run(() -> R): R' type=kotlin.Unit origin=null : kotlin.Unit block: BLOCK type=() -> kotlin.Unit origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: @@ -21,7 +21,7 @@ FILE fqName: fileName:/nonLocalReturn.kt FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY - CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null + CALL 'run(() -> R): R' type=kotlin.Unit origin=null : kotlin.Unit block: BLOCK type=() -> kotlin.Unit origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: @@ -31,13 +31,13 @@ FILE fqName: fileName:/nonLocalReturn.kt FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY - CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null + CALL 'run(() -> R): R' type=kotlin.Unit origin=null : kotlin.Unit block: BLOCK type=() -> kotlin.Unit origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' - CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing origin=null + CALL 'run(() -> R): R' type=kotlin.Nothing origin=null : kotlin.Nothing block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags: @@ -49,7 +49,7 @@ FILE fqName: fileName:/nonLocalReturn.kt FUN name:testLrmFoo1 visibility:public modality:FINAL <> (ints:kotlin.collections.List) returnType:kotlin.Unit flags: VALUE_PARAMETER name:ints index:0 type:kotlin.collections.List flags: BLOCK_BODY - CALL 'forEach((Int) -> Unit) on Iterable: Unit' type=kotlin.Unit origin=null + CALL 'forEach((T) -> Unit) on Iterable: Unit' type=kotlin.Unit origin=null : kotlin.Int $receiver: GET_VAR 'value-parameter ints: List' type=kotlin.collections.List origin=null action: BLOCK type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA @@ -70,7 +70,7 @@ FILE fqName: fileName:/nonLocalReturn.kt FUN name:testLrmFoo2 visibility:public modality:FINAL <> (ints:kotlin.collections.List) returnType:kotlin.Unit flags: VALUE_PARAMETER name:ints index:0 type:kotlin.collections.List flags: BLOCK_BODY - CALL 'forEach((Int) -> Unit) on Iterable: Unit' type=kotlin.Unit origin=null + CALL 'forEach((T) -> Unit) on Iterable: Unit' type=kotlin.Unit origin=null : kotlin.Int $receiver: GET_VAR 'value-parameter ints: List' type=kotlin.collections.List origin=null action: BLOCK type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA diff --git a/compiler/testData/ir/irText/regressions/integerCoercionToT.txt b/compiler/testData/ir/irText/regressions/integerCoercionToT.txt index 3424d746741..6fe6de82fd1 100644 --- a/compiler/testData/ir/irText/regressions/integerCoercionToT.txt +++ b/compiler/testData/ir/irText/regressions/integerCoercionToT.txt @@ -90,7 +90,7 @@ FILE fqName: fileName:/integerCoercionToT.kt VALUE_PARAMETER name:value index:0 type:IdType flags: VALUE_PARAMETER name:cv index:1 type:CInt32Var /* = CInt32VarX */ flags: BLOCK_BODY - CALL '(Int) on CInt32VarX: Unit' type=kotlin.Unit origin=EQ + CALL '(T_INT) on CInt32VarX: Unit' type=kotlin.Unit origin=EQ <`0>: kotlin.Int $receiver: GET_VAR 'value-parameter cv: CInt32Var /* = CInt32VarX */' type=CInt32Var /* = CInt32VarX */ origin=null value: CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY diff --git a/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt b/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt index 61f0f39b11a..1f23119327e 100644 --- a/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt +++ b/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt @@ -34,12 +34,12 @@ FILE fqName: fileName:/fixationOrder1.kt FUN name:test visibility:public modality:FINAL <> () returnType:Inv2 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test(): Inv2' - CALL 'check(String, Int, (String) -> Int): Inv2' type=Inv2 origin=null + CALL 'check(T, R, (T) -> R): Inv2' type=Inv2 origin=null : kotlin.String : kotlin.Int x: CONST String type=kotlin.String value="" y: CONST Int type=kotlin.Int value=1 - f: CALL 'foo(): (String) -> Int' type=(kotlin.String) -> kotlin.Int origin=null + f: CALL 'foo(): (X) -> Y' type=(kotlin.String) -> kotlin.Int origin=null : kotlin.String : kotlin.Int FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt index 21db9366b53..818e8ef3e54 100644 --- a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt +++ b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt @@ -36,11 +36,11 @@ FILE fqName: fileName:/typeAliasCtorForGenericClass.kt FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY VAR name:b type:B /* = A */ flags:val - CALL 'constructor A(Int)' type=A origin=null + CALL 'constructor A(Q)' type=A origin=null : kotlin.Int q: CONST Int type=kotlin.Int value=2 VAR name:b2 type:B2 /* = A> */ flags:val - CALL 'constructor A(A)' type=A> origin=null + CALL 'constructor A(Q)' type=A> origin=null : A q: GET_VAR 'b: B /* = A */' type=B /* = A */ origin=null diff --git a/compiler/testData/ir/irText/stubs/builtinMap.txt b/compiler/testData/ir/irText/stubs/builtinMap.txt index e2471d8df00..9bde0844df0 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.txt @@ -10,15 +10,15 @@ FILE fqName: fileName:/builtinMap.kt BRANCH if: CALL 'isEmpty(): Boolean' type=kotlin.Boolean origin=null $this: GET_VAR 'this@plus: Map' type=kotlin.collections.Map origin=null - then: CALL 'mapOf(Pair): Map' type=kotlin.collections.Map origin=null + then: CALL 'mapOf(Pair): Map' type=kotlin.collections.Map origin=null : K1 : V1 pair: GET_VAR 'value-parameter pair: Pair' type=kotlin.Pair origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'apply(LinkedHashMap /* = LinkedHashMap */.() -> Unit) on LinkedHashMap /* = LinkedHashMap */: LinkedHashMap /* = LinkedHashMap */' type=kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */ origin=null + then: CALL 'apply(T.() -> Unit) on T: T' type=kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */ origin=null : kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */ - $receiver: CALL 'constructor LinkedHashMap((MutableMap..Map?))' type=java.util.LinkedHashMap origin=null + $receiver: CALL 'constructor LinkedHashMap((MutableMap..Map?))' type=java.util.LinkedHashMap origin=null : K1? : V1? p0: GET_VAR 'this@plus: Map' type=kotlin.collections.Map origin=null @@ -29,10 +29,10 @@ FILE fqName: fileName:/builtinMap.kt RETURN type=kotlin.Nothing from='() on LinkedHashMap /* = LinkedHashMap */: Unit' TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] - CALL 'put(K1!, V1!): V1?' type=V1? origin=null + CALL 'put(K, V): V?' type=V1? origin=null $this: GET_VAR 'this@: LinkedHashMap<(K1..K1?), (V1..V1?)>' type=kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */ origin=null - key: CALL '(): K1' type=K1 origin=GET_PROPERTY + key: CALL '(): A' type=K1 origin=GET_PROPERTY $this: GET_VAR 'value-parameter pair: Pair' type=kotlin.Pair origin=null - value: CALL '(): V1' type=V1 origin=GET_PROPERTY + value: CALL '(): B' type=V1 origin=GET_PROPERTY $this: GET_VAR 'value-parameter pair: Pair' type=kotlin.Pair origin=null FUNCTION_REFERENCE '() on LinkedHashMap /* = LinkedHashMap */: Unit' type=kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */.() -> kotlin.Unit origin=LAMBDA diff --git a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt index 82a5c08afb2..306e111ae89 100644 --- a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt +++ b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt @@ -41,6 +41,6 @@ @20:10..23 VALUE_PARAMETER name:a index:0 type:() -> test.Host flags: @20:25..22:1 BLOCK_BODY @21:4..12 CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ - @21:4..7 CALL 'invoke(): Host' type=test.Host origin=INVOKE + @21:4..7 CALL 'invoke(): R' type=test.Host origin=INVOKE @21:4..5 GET_VAR 'value-parameter a: () -> Host' type=() -> test.Host origin=VARIABLE_AS_FUNCTION @21:11..12 CONST Int type=kotlin.Int value=1