diff --git a/compiler/testData/ir/irText/classes/clashingFakeOverrideSignatures.fir.kt.txt b/compiler/testData/ir/irText/classes/clashingFakeOverrideSignatures.fir.kt.txt new file mode 100644 index 00000000000..a2d4c878a57 --- /dev/null +++ b/compiler/testData/ir/irText/classes/clashingFakeOverrideSignatures.fir.kt.txt @@ -0,0 +1,172 @@ +open class Base { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + fun foo(x: T) { + } + + fun foo(y: String) { + } + + val T.bar: Int + get(): Int { + return 1 + } + + val String.bar: Int + get(): Int { + return 2 + } + +} + +open class Derived : Base { + constructor() /* primary */ { + super/*Base*/() + /* () */ + + } + +} + +class Derived2 : Derived { + constructor() /* primary */ { + super/*Derived*/() + /* () */ + + } + +} + +fun test(b: Base, d: Derived, d2: Derived2) { + b.foo(x = "") + b.foo(y = "") + d.foo(x = "") + d.foo(y = "") + d2.foo(x = "") + d2.foo(y = "") +} + +open class BaseXY { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + fun foo(x: X, y: String) { + } + + fun foo(x: String, y: Y) { + } + +} + +class DerivedXY : BaseXY { + constructor() /* primary */ { + super/*BaseXY*/() + /* () */ + + } + +} + +fun outerFun() { + local open class LocalBase { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + fun foo(x: T) { + } + + fun foo(y: String) { + } + + val T.bar: Int + get(): Int { + return 1 + } + + val String.bar: Int + get(): Int { + return 2 + } + + } + + local open class LocalDerived : LocalBase { + constructor() /* primary */ { + super/*LocalBase*/() + /* () */ + + } + + } + + local class LocalDerived2 : LocalDerived { + constructor() /* primary */ { + super/*LocalDerived*/() + /* () */ + + } + + } + + local fun test(b: LocalBase, d: LocalDerived, d2: LocalDerived2) { + b.foo(x = "") + b.foo(y = "") + d.foo(x = "") + d.foo(y = "") + d2.foo(x = "") + d2.foo(y = "") + } + +} + +open class Outer { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + open inner class Inner { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + fun foo(x: T) { + } + + fun foo(y: String) { + } + + } + +} + +class OuterDerived : Outer { + constructor() /* primary */ { + super/*Outer*/() + /* () */ + + } + + inner class InnerDerived : Inner { + constructor() /* primary */ { + .super/*Inner*/() + /* () */ + + } + + } + +} diff --git a/compiler/testData/ir/irText/classes/kt19306_test1.fir.txt b/compiler/testData/ir/irText/classes/kt19306.fir.txt similarity index 51% rename from compiler/testData/ir/irText/classes/kt19306_test1.fir.txt rename to compiler/testData/ir/irText/classes/kt19306.fir.txt index 4fa37d61152..0720e5c09c4 100644 --- a/compiler/testData/ir/irText/classes/kt19306_test1.fir.txt +++ b/compiler/testData/ir/irText/classes/kt19306.fir.txt @@ -37,3 +37,39 @@ FILE fqName:test1 fileName:/kt19306_test1.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any +FILE fqName:test2 fileName:/kt19306_test2.kt + CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test2.B + CONSTRUCTOR visibility:public <> () returnType:test2.B [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in test1.A' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A]' + FUN name:test visibility:public modality:FINAL <> ($this:test2.B) returnType:kotlin.Function0 + $this: VALUE_PARAMETER name: type:test2.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun test (): kotlin.Function0 declared in test2.B' + FUN_EXPR type=kotlin.Function0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in test2.B.test' + CALL 'protected final fun (): kotlin.String declared in test1.A' type=kotlin.String origin=GET_PROPERTY + $this: GET_VAR ': test2.B declared in test2.B.test' type=test2.B origin=null + PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] + FUN FAKE_OVERRIDE name: visibility:protected modality:FINAL <> ($this:test1.A) returnType:kotlin.String [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] + overridden: + protected final fun (): kotlin.String declared in test1.A + $this: VALUE_PARAMETER name: type:test1.A + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] + 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 [fake_override] + 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/classes/kt19306_test1.txt b/compiler/testData/ir/irText/classes/kt19306.txt similarity index 51% rename from compiler/testData/ir/irText/classes/kt19306_test1.txt rename to compiler/testData/ir/irText/classes/kt19306.txt index 4fa37d61152..a721f8bbb06 100644 --- a/compiler/testData/ir/irText/classes/kt19306_test1.txt +++ b/compiler/testData/ir/irText/classes/kt19306.txt @@ -37,3 +37,39 @@ FILE fqName:test1 fileName:/kt19306_test1.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any +FILE fqName:test2 fileName:/kt19306_test2.kt + CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test2.B + CONSTRUCTOR visibility:public <> () returnType:test2.B [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in test1.A' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A]' + FUN name:test visibility:public modality:FINAL <> ($this:test2.B) returnType:kotlin.Function0 + $this: VALUE_PARAMETER name: type:test2.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun test (): kotlin.Function0 declared in test2.B' + FUN_EXPR type=kotlin.Function0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in test2.B.test' + CALL 'protected final fun (): kotlin.String [fake_override] declared in test2.B' type=kotlin.String origin=GET_PROPERTY + $this: GET_VAR ': test2.B declared in test2.B.test' type=test2.B origin=null + PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] + FUN FAKE_OVERRIDE name: visibility:protected modality:FINAL <> ($this:test1.A) returnType:kotlin.String [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] + overridden: + protected final fun (): kotlin.String declared in test1.A + $this: VALUE_PARAMETER name: type:test1.A + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in test1.A + $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 [fake_override] + overridden: + public open fun hashCode (): kotlin.Int [fake_override] declared in test1.A + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String [fake_override] declared in test1.A + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/classes/kt19306_test2.fir.txt b/compiler/testData/ir/irText/classes/kt19306_test2.fir.txt deleted file mode 100644 index 967a701cd4e..00000000000 --- a/compiler/testData/ir/irText/classes/kt19306_test2.fir.txt +++ /dev/null @@ -1,36 +0,0 @@ -FILE fqName:test2 fileName:/kt19306_test2.kt - CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test2.B - CONSTRUCTOR visibility:public <> () returnType:test2.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in test1.A' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A]' - FUN name:test visibility:public modality:FINAL <> ($this:test2.B) returnType:kotlin.Function0 - $this: VALUE_PARAMETER name: type:test2.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test (): kotlin.Function0 declared in test2.B' - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in test2.B.test' - CALL 'protected final fun (): kotlin.String declared in test1.A' type=kotlin.String origin=GET_PROPERTY - $this: GET_VAR ': test2.B declared in test2.B.test' type=test2.B origin=null - PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] - FUN FAKE_OVERRIDE name: visibility:protected modality:FINAL <> ($this:test1.A) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] - overridden: - protected final fun (): kotlin.String declared in test1.A - $this: VALUE_PARAMETER name: type:test1.A - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] - 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 [fake_override] - 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/classes/kt19306_test2.txt b/compiler/testData/ir/irText/classes/kt19306_test2.txt deleted file mode 100644 index 07b3e3b2e33..00000000000 --- a/compiler/testData/ir/irText/classes/kt19306_test2.txt +++ /dev/null @@ -1,36 +0,0 @@ -FILE fqName:test2 fileName:/kt19306_test2.kt - CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test2.B - CONSTRUCTOR visibility:public <> () returnType:test2.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in test1.A' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A]' - FUN name:test visibility:public modality:FINAL <> ($this:test2.B) returnType:kotlin.Function0 - $this: VALUE_PARAMETER name: type:test2.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test (): kotlin.Function0 declared in test2.B' - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in test2.B.test' - CALL 'protected final fun (): kotlin.String [fake_override] declared in test2.B' type=kotlin.String origin=GET_PROPERTY - $this: GET_VAR ': test2.B declared in test2.B.test' type=test2.B origin=null - PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] - FUN FAKE_OVERRIDE name: visibility:protected modality:FINAL <> ($this:test1.A) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] - overridden: - protected final fun (): kotlin.String declared in test1.A - $this: VALUE_PARAMETER name: type:test1.A - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in test1.A - $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 [fake_override] - overridden: - public open fun hashCode (): kotlin.Int [fake_override] declared in test1.A - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String [fake_override] declared in test1.A - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.fir.kt.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt similarity index 100% rename from compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.fir.kt.txt rename to compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.fir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.txt similarity index 100% rename from compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.fir.txt rename to compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.txt diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.kt.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt.txt similarity index 99% rename from compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.kt.txt rename to compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt.txt index 0d4ca8768c5..9551f5faaf1 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.kt.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt.txt @@ -14,4 +14,3 @@ fun test(j: J) { tmp2_receiver.setFoo(x = tmp2_receiver.getFoo().plus(other = 1)) } } - diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.txt similarity index 100% rename from compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.txt rename to compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.txt diff --git a/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.fir.kt.txt b/compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.fir.kt.txt similarity index 100% rename from compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.fir.kt.txt rename to compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.fir.kt.txt diff --git a/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.fir.txt b/compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.fir.txt similarity index 100% rename from compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.fir.txt rename to compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.fir.txt diff --git a/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.txt b/compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.txt similarity index 100% rename from compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.txt rename to compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.txt diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.kt.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.fir.kt.txt similarity index 83% rename from compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.kt.txt rename to compiler/testData/ir/irText/expressions/signedToUnsignedConversions.fir.kt.txt index 49dbb8c9740..72545183027 100644 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.fir.kt.txt @@ -1,3 +1,13 @@ +// FILE: signedToUnsignedConversions_annotation.kt +package kotlin.internal + +annotation class ImplicitIntegerCoercion : Annotation { + constructor() /* primary */ + +} + +// FILE: signedToUnsignedConversions_test.kt + @ImplicitIntegerCoercion const val IMPLICIT_INT: Int field = 255 @@ -55,4 +65,3 @@ fun test() { error("") /* ErrorCallExpression */255; error("") /* ErrorCallExpression */255; 255; 42; } - diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.fir.txt similarity index 84% rename from compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt rename to compiler/testData/ir/irText/expressions/signedToUnsignedConversions.fir.txt index 9ae545d9b20..4c2e1a69dca 100644 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt +++ b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.fir.txt @@ -1,3 +1,20 @@ +FILE fqName:kotlin.internal fileName:/signedToUnsignedConversions_annotation.kt + CLASS ANNOTATION_CLASS name:ImplicitIntegerCoercion modality:FINAL visibility:public superTypes:[kotlin.Annotation] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:kotlin.internal.ImplicitIntegerCoercion + CONSTRUCTOR visibility:public <> () returnType:kotlin.internal.ImplicitIntegerCoercion [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] + 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 [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any FILE fqName: fileName:/signedToUnsignedConversions_test.kt PROPERTY name:IMPLICIT_INT visibility:public modality:FINAL [const,val] annotations: diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.txt similarity index 82% rename from compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.txt rename to compiler/testData/ir/irText/expressions/signedToUnsignedConversions.txt index 1e1e6e7e94f..3c0815c6b4e 100644 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.txt +++ b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.txt @@ -1,3 +1,20 @@ +FILE fqName:kotlin.internal fileName:/signedToUnsignedConversions_annotation.kt + CLASS ANNOTATION_CLASS name:ImplicitIntegerCoercion modality:FINAL visibility:public superTypes:[kotlin.Annotation] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:kotlin.internal.ImplicitIntegerCoercion + CONSTRUCTOR visibility:public <> () returnType:kotlin.internal.ImplicitIntegerCoercion [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Annotation + $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 [fake_override] + overridden: + public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation + $this: VALUE_PARAMETER name: type:kotlin.Any FILE fqName: fileName:/signedToUnsignedConversions_test.kt PROPERTY name:IMPLICIT_INT visibility:public modality:FINAL [const,val] annotations: @@ -98,27 +115,27 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun takeUByte (u: kotlin.UByte): kotlin.Unit declared in ' type=kotlin.Unit origin=null - u: CALL 'public final fun toUByte (): kotlin.UByte [inline] declared in kotlin' type=kotlin.UByte origin=null + u: CALL 'public final fun toUByte (): kotlin.UByte [inline] declared in kotlin.UByteKt' type=kotlin.UByte origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY CALL 'public final fun takeUByte (u: kotlin.UByte): kotlin.Unit declared in ' type=kotlin.Unit origin=null - u: CALL 'public final fun toUByte (): kotlin.UByte [inline] declared in kotlin' type=kotlin.UByte origin=null + u: CALL 'public final fun toUByte (): kotlin.UByte [inline] declared in kotlin.UByteKt' type=kotlin.UByte origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY CALL 'public final fun takeUShort (u: kotlin.UShort): kotlin.Unit declared in ' type=kotlin.Unit origin=null - u: CALL 'public final fun toUShort (): kotlin.UShort [inline] declared in kotlin' type=kotlin.UShort origin=null + u: CALL 'public final fun toUShort (): kotlin.UShort [inline] declared in kotlin.UShortKt' type=kotlin.UShort origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY CALL 'public final fun takeUShort (u: kotlin.UShort): kotlin.Unit declared in ' type=kotlin.Unit origin=null - u: CALL 'public final fun toUShort (): kotlin.UShort [inline] declared in kotlin' type=kotlin.UShort origin=null + u: CALL 'public final fun toUShort (): kotlin.UShort [inline] declared in kotlin.UShortKt' type=kotlin.UShort origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY CALL 'public final fun takeUInt (u: kotlin.UInt): kotlin.Unit declared in ' type=kotlin.Unit origin=null - u: CALL 'public final fun toUInt (): kotlin.UInt [inline] declared in kotlin' type=kotlin.UInt origin=null + u: CALL 'public final fun toUInt (): kotlin.UInt [inline] declared in kotlin.UIntKt' type=kotlin.UInt origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY CALL 'public final fun takeULong (u: kotlin.ULong): kotlin.Unit declared in ' type=kotlin.Unit origin=null - u: CALL 'public final fun toULong (): kotlin.ULong [inline] declared in kotlin' type=kotlin.ULong origin=null + u: CALL 'public final fun toULong (): kotlin.ULong [inline] declared in kotlin.ULongKt' type=kotlin.ULong origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY CALL 'public final fun takeUBytes (vararg u: kotlin.UByte): kotlin.Unit declared in ' type=kotlin.Unit origin=null u: VARARG type=kotlin.UByteArray varargElementType=kotlin.UByte - CALL 'public final fun toUByte (): kotlin.UByte [inline] declared in kotlin' type=kotlin.UByte origin=null + CALL 'public final fun toUByte (): kotlin.UByte [inline] declared in kotlin.UByteKt' type=kotlin.UByte origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - CALL 'public final fun toUByte (): kotlin.UByte [inline] declared in kotlin' type=kotlin.UByte origin=null + CALL 'public final fun toUByte (): kotlin.UByte [inline] declared in kotlin.UByteKt' type=kotlin.UByte origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY CONST Byte type=kotlin.UByte value=42 diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_annotation.fir.kt.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_annotation.fir.kt.txt deleted file mode 100644 index 9acc6bebb01..00000000000 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_annotation.fir.kt.txt +++ /dev/null @@ -1,6 +0,0 @@ -package kotlin.internal - -annotation class ImplicitIntegerCoercion : Annotation { - constructor() /* primary */ - -} diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_annotation.fir.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_annotation.fir.txt deleted file mode 100644 index e5ec2b99229..00000000000 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_annotation.fir.txt +++ /dev/null @@ -1,17 +0,0 @@ -FILE fqName:kotlin.internal fileName:/signedToUnsignedConversions_annotation.kt - CLASS ANNOTATION_CLASS name:ImplicitIntegerCoercion modality:FINAL visibility:public superTypes:[kotlin.Annotation] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:kotlin.internal.ImplicitIntegerCoercion - CONSTRUCTOR visibility:public <> () returnType:kotlin.internal.ImplicitIntegerCoercion [primary] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] - 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 [fake_override] - 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/signedToUnsignedConversions_annotation.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_annotation.txt deleted file mode 100644 index dcd425b4b48..00000000000 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_annotation.txt +++ /dev/null @@ -1,17 +0,0 @@ -FILE fqName:kotlin.internal fileName:/signedToUnsignedConversions_annotation.kt - CLASS ANNOTATION_CLASS name:ImplicitIntegerCoercion modality:FINAL visibility:public superTypes:[kotlin.Annotation] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:kotlin.internal.ImplicitIntegerCoercion - CONSTRUCTOR visibility:public <> () returnType:kotlin.internal.ImplicitIntegerCoercion [primary] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Annotation - $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 [fake_override] - overridden: - public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/firProblems/FirBuilder.fir.kt.txt b/compiler/testData/ir/irText/firProblems/FirBuilder.fir.kt.txt index 62fa200f594..aab5e1a0795 100644 --- a/compiler/testData/ir/irText/firProblems/FirBuilder.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/FirBuilder.fir.kt.txt @@ -1,3 +1,22 @@ +// MODULE: m1 +// FILE: BaseFirBuilder.kt + +abstract class BaseFirBuilder { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + inline fun withCapturedTypeParameters(block: Function0): T { + return block.invoke() + } + +} + +// MODULE: m2 +// FILE: FirBuilder.kt + open class BaseConverter : BaseFirBuilder { constructor() /* primary */ { super/*BaseFirBuilder*/() @@ -15,3 +34,4 @@ class DeclarationsConverter : BaseConverter { } } + diff --git a/compiler/testData/ir/irText/firProblems/FirBuilder.fir.txt b/compiler/testData/ir/irText/firProblems/FirBuilder.fir.txt index 8e2d8a94752..107db8c8551 100644 --- a/compiler/testData/ir/irText/firProblems/FirBuilder.fir.txt +++ b/compiler/testData/ir/irText/firProblems/FirBuilder.fir.txt @@ -1,3 +1,34 @@ +Module: m1 +FILE fqName: fileName:/BaseFirBuilder.kt + CLASS CLASS name:BaseFirBuilder modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.BaseFirBuilder.BaseFirBuilder> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + CONSTRUCTOR visibility:public <> () returnType:.BaseFirBuilder.BaseFirBuilder> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:BaseFirBuilder modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' + FUN name:withCapturedTypeParameters visibility:public modality:FINAL ($this:.BaseFirBuilder.BaseFirBuilder>, block:kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters>) returnType:T of .BaseFirBuilder.withCapturedTypeParameters [inline] + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + $this: VALUE_PARAMETER name: type:.BaseFirBuilder.BaseFirBuilder> + VALUE_PARAMETER name:block index:0 type:kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun withCapturedTypeParameters (block: kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters>): T of .BaseFirBuilder.withCapturedTypeParameters [inline] declared in .BaseFirBuilder' + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .BaseFirBuilder.withCapturedTypeParameters origin=INVOKE + $this: GET_VAR 'block: kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters> declared in .BaseFirBuilder.withCapturedTypeParameters' type=kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters> origin=VARIABLE_AS_FUNCTION + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] + 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 [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any +Module: m2 FILE fqName: fileName:/FirBuilder.kt CLASS CLASS name:BaseConverter modality:OPEN visibility:public superTypes:[.BaseFirBuilder] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.BaseConverter diff --git a/compiler/testData/ir/irText/firProblems/FirBuilder.txt b/compiler/testData/ir/irText/firProblems/FirBuilder.txt index f71e2079911..8043b0f6957 100644 --- a/compiler/testData/ir/irText/firProblems/FirBuilder.txt +++ b/compiler/testData/ir/irText/firProblems/FirBuilder.txt @@ -1,3 +1,34 @@ +Module: m1 +FILE fqName: fileName:/BaseFirBuilder.kt + CLASS CLASS name:BaseFirBuilder modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.BaseFirBuilder.BaseFirBuilder> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + CONSTRUCTOR visibility:public <> () returnType:.BaseFirBuilder.BaseFirBuilder> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:BaseFirBuilder modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' + FUN name:withCapturedTypeParameters visibility:public modality:FINAL ($this:.BaseFirBuilder.BaseFirBuilder>, block:kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters>) returnType:T of .BaseFirBuilder.withCapturedTypeParameters [inline] + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + $this: VALUE_PARAMETER name: type:.BaseFirBuilder.BaseFirBuilder> + VALUE_PARAMETER name:block index:0 type:kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun withCapturedTypeParameters (block: kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters>): T of .BaseFirBuilder.withCapturedTypeParameters [inline] declared in .BaseFirBuilder' + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .BaseFirBuilder.withCapturedTypeParameters origin=INVOKE + $this: GET_VAR 'block: kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters> declared in .BaseFirBuilder.withCapturedTypeParameters' type=kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters> origin=VARIABLE_AS_FUNCTION + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] + 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 [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any +Module: m2 FILE fqName: fileName:/FirBuilder.kt CLASS CLASS name:BaseConverter modality:OPEN visibility:public superTypes:[.BaseFirBuilder] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.BaseConverter diff --git a/compiler/testData/ir/irText/firProblems/v8arrayToList.fir.kt.txt b/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.kt.txt similarity index 100% rename from compiler/testData/ir/irText/firProblems/v8arrayToList.fir.kt.txt rename to compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.kt.txt diff --git a/compiler/testData/ir/irText/firProblems/v8arrayToList.fir.txt b/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.txt similarity index 100% rename from compiler/testData/ir/irText/firProblems/v8arrayToList.fir.txt rename to compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.txt diff --git a/compiler/testData/ir/irText/firProblems/v8arrayToList.txt b/compiler/testData/ir/irText/firProblems/V8ArrayToList.txt similarity index 100% rename from compiler/testData/ir/irText/firProblems/v8arrayToList.txt rename to compiler/testData/ir/irText/firProblems/V8ArrayToList.txt diff --git a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.fir.kt.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.fir.kt.txt new file mode 100644 index 00000000000..95c3a55ee57 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.fir.kt.txt @@ -0,0 +1,52 @@ +// MODULE: m1 +// FILE: genericClassInDifferentModule_m1.kt + +abstract class Base { + constructor(x: T) /* primary */ { + super/*Any*/() + /* () */ + + } + + val x: T + field = x + get + + abstract fun foo(y: Y): T + abstract var bar: T + abstract get + abstract set + + abstract var Z.exn: T + abstract get + abstract set + +} + +// MODULE: m2 +// FILE: genericClassInDifferentModule_m2.kt + +class Derived1 : Base { + constructor(x: T) /* primary */ { + super/*Base*/(x = x) + /* () */ + + } + + override fun foo(y: Y): T { + return .() + } + + override var bar: T + field = x + override get + override set + + override var Z.exn: T + override get(): T { + return .() + } + override set(value: T) { + } + +} diff --git a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.fir.txt similarity index 56% rename from compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.txt rename to compiler/testData/ir/irText/stubs/genericClassInDifferentModule.fir.txt index 5313447e273..6c4b4159ebf 100644 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.txt +++ b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.fir.txt @@ -1,3 +1,62 @@ +Module: m1 +FILE fqName: fileName:/genericClassInDifferentModule_m1.kt + CLASS CLASS name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Base.Base> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + CONSTRUCTOR visibility:public <> (x:T of .Base) returnType:.Base.Base> [primary] + VALUE_PARAMETER name:x index:0 type:T of .Base + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' + PROPERTY name:x visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:x type:T of .Base visibility:private [final] + EXPRESSION_BODY + GET_VAR 'x: T of .Base declared in .Base.' type=T of .Base origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Base.Base>) returnType:T of .Base + correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.Base.Base> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): T of .Base declared in .Base' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Base visibility:private [final]' type=T of .Base origin=null + receiver: GET_VAR ': .Base.Base> declared in .Base.' type=.Base.Base> origin=null + FUN name:foo visibility:public modality:ABSTRACT ($this:.Base.Base>, y:Y of .Base.foo) returnType:T of .Base + TYPE_PARAMETER name:Y index:0 variance: superTypes:[kotlin.Any?] + $this: VALUE_PARAMETER name: type:.Base.Base> + VALUE_PARAMETER name:y index:0 type:Y of .Base.foo + PROPERTY name:bar visibility:public modality:ABSTRACT [var] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Base.Base>) returnType:T of .Base + correspondingProperty: PROPERTY name:bar visibility:public modality:ABSTRACT [var] + $this: VALUE_PARAMETER name: type:.Base.Base> + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Base.Base>, :T of .Base) returnType:kotlin.Unit + correspondingProperty: PROPERTY name:bar visibility:public modality:ABSTRACT [var] + $this: VALUE_PARAMETER name: type:.Base.Base> + VALUE_PARAMETER name: index:0 type:T of .Base + PROPERTY name:exn visibility:public modality:ABSTRACT [var] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT ($this:.Base.Base>, $receiver:Z of .Base.) returnType:T of .Base + correspondingProperty: PROPERTY name:exn visibility:public modality:ABSTRACT [var] + TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] + $this: VALUE_PARAMETER name: type:.Base.Base> + $receiver: VALUE_PARAMETER name: type:Z of .Base. + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT ($this:.Base.Base>, $receiver:Z of .Base., :T of .Base) returnType:kotlin.Unit + correspondingProperty: PROPERTY name:exn visibility:public modality:ABSTRACT [var] + TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] + $this: VALUE_PARAMETER name: type:.Base.Base> + $receiver: VALUE_PARAMETER name: type:Z of .Base. + VALUE_PARAMETER name: index:0 type:T of .Base + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] + 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 [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any +Module: m2 FILE fqName: fileName:/genericClassInDifferentModule_m2.kt CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[.Base.Derived1>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Derived1.Derived1> @@ -26,7 +85,7 @@ FILE fqName: fileName:/genericClassInDifferentModule_m2.kt FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Derived1.Derived1>) returnType:T of .Derived1 correspondingProperty: PROPERTY name:bar visibility:public modality:FINAL [var] overridden: - public abstract fun (): T of .Base declared in .Base + public final fun (): T of .Base declared in .Base $this: VALUE_PARAMETER name: type:.Derived1.Derived1> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of .Derived1 declared in .Derived1' @@ -35,7 +94,7 @@ FILE fqName: fileName:/genericClassInDifferentModule_m2.kt FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Derived1.Derived1>, :T of .Derived1) returnType:kotlin.Unit correspondingProperty: PROPERTY name:bar visibility:public modality:FINAL [var] overridden: - public abstract fun (: T of .Base): kotlin.Unit declared in .Base + public final fun (: T of .Base): kotlin.Unit declared in .Base $this: VALUE_PARAMETER name: type:.Derived1.Derived1> VALUE_PARAMETER name: index:0 type:T of .Derived1 BLOCK_BODY @@ -46,7 +105,7 @@ FILE fqName: fileName:/genericClassInDifferentModule_m2.kt FUN name: visibility:public modality:FINAL ($this:.Derived1.Derived1>, $receiver:Z of .Derived1.) returnType:T of .Derived1 correspondingProperty: PROPERTY name:exn visibility:public modality:FINAL [var] overridden: - public abstract fun (): T of .Base declared in .Base + public final fun (): T of .Base declared in .Base TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] $this: VALUE_PARAMETER name: type:.Derived1.Derived1> $receiver: VALUE_PARAMETER name: type:Z of .Derived1. @@ -57,7 +116,7 @@ FILE fqName: fileName:/genericClassInDifferentModule_m2.kt FUN name: visibility:public modality:FINAL ($this:.Derived1.Derived1>, $receiver:Z of .Derived1., value:T of .Derived1) returnType:kotlin.Unit correspondingProperty: PROPERTY name:exn visibility:public modality:FINAL [var] overridden: - public abstract fun (: T of .Base): kotlin.Unit declared in .Base + public final fun (: T of .Base): kotlin.Unit declared in .Base TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] $this: VALUE_PARAMETER name: type:.Derived1.Derived1> $receiver: VALUE_PARAMETER name: type:Z of .Derived1. diff --git a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.txt similarity index 59% rename from compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.txt rename to compiler/testData/ir/irText/stubs/genericClassInDifferentModule.txt index b78a131f60d..557bab4ce4b 100644 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.txt +++ b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.txt @@ -1,3 +1,62 @@ +Module: m1 +FILE fqName: fileName:/genericClassInDifferentModule_m1.kt + CLASS CLASS name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Base.Base> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + CONSTRUCTOR visibility:public <> (x:T of .Base) returnType:.Base.Base> [primary] + VALUE_PARAMETER name:x index:0 type:T of .Base + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' + PROPERTY name:x visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:x type:T of .Base visibility:private [final] + EXPRESSION_BODY + GET_VAR 'x: T of .Base declared in .Base.' type=T of .Base origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Base.Base>) returnType:T of .Base + correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.Base.Base> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): T of .Base declared in .Base' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Base visibility:private [final]' type=T of .Base origin=null + receiver: GET_VAR ': .Base.Base> declared in .Base.' type=.Base.Base> origin=null + FUN name:foo visibility:public modality:ABSTRACT ($this:.Base.Base>, y:Y of .Base.foo) returnType:T of .Base + TYPE_PARAMETER name:Y index:0 variance: superTypes:[kotlin.Any?] + $this: VALUE_PARAMETER name: type:.Base.Base> + VALUE_PARAMETER name:y index:0 type:Y of .Base.foo + PROPERTY name:bar visibility:public modality:ABSTRACT [var] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Base.Base>) returnType:T of .Base + correspondingProperty: PROPERTY name:bar visibility:public modality:ABSTRACT [var] + $this: VALUE_PARAMETER name: type:.Base.Base> + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Base.Base>, :T of .Base) returnType:kotlin.Unit + correspondingProperty: PROPERTY name:bar visibility:public modality:ABSTRACT [var] + $this: VALUE_PARAMETER name: type:.Base.Base> + VALUE_PARAMETER name: index:0 type:T of .Base + PROPERTY name:exn visibility:public modality:ABSTRACT [var] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT ($this:.Base.Base>, $receiver:Z of .Base.) returnType:T of .Base + correspondingProperty: PROPERTY name:exn visibility:public modality:ABSTRACT [var] + TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] + $this: VALUE_PARAMETER name: type:.Base.Base> + $receiver: VALUE_PARAMETER name: type:Z of .Base. + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT ($this:.Base.Base>, $receiver:Z of .Base., :T of .Base) returnType:kotlin.Unit + correspondingProperty: PROPERTY name:exn visibility:public modality:ABSTRACT [var] + TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] + $this: VALUE_PARAMETER name: type:.Base.Base> + $receiver: VALUE_PARAMETER name: type:Z of .Base. + VALUE_PARAMETER name: index:0 type:T of .Base + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] + 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 [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any +Module: m2 FILE fqName: fileName:/genericClassInDifferentModule_m2.kt CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[.Base.Derived1>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Derived1.Derived1> diff --git a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m1.fir.kt.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m1.fir.kt.txt deleted file mode 100644 index 75c23ef42be..00000000000 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m1.fir.kt.txt +++ /dev/null @@ -1,21 +0,0 @@ -abstract class Base { - constructor(x: T) /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: T - field = x - get - - abstract fun foo(y: Y): T - abstract var bar: T - abstract get - abstract set - - abstract var Z.exn: T - abstract get - abstract set - -} diff --git a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m1.fir.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m1.fir.txt deleted file mode 100644 index 550fbf0e573..00000000000 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m1.fir.txt +++ /dev/null @@ -1,57 +0,0 @@ -FILE fqName: fileName:/genericClassInDifferentModule_m1.kt - CLASS CLASS name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Base.Base> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> (x:T of .Base) returnType:.Base.Base> [primary] - VALUE_PARAMETER name:x index:0 type:T of .Base - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:T of .Base visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: T of .Base declared in .Base.' type=T of .Base origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Base.Base>) returnType:T of .Base - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Base.Base> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of .Base declared in .Base' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Base visibility:private [final]' type=T of .Base origin=null - receiver: GET_VAR ': .Base.Base> declared in .Base.' type=.Base.Base> origin=null - FUN name:foo visibility:public modality:ABSTRACT ($this:.Base.Base>, y:Y of .Base.foo) returnType:T of .Base - TYPE_PARAMETER name:Y index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Base.Base> - VALUE_PARAMETER name:y index:0 type:Y of .Base.foo - PROPERTY name:bar visibility:public modality:ABSTRACT [var] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Base.Base>) returnType:T of .Base - correspondingProperty: PROPERTY name:bar visibility:public modality:ABSTRACT [var] - $this: VALUE_PARAMETER name: type:.Base.Base> - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Base.Base>, :T of .Base) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:bar visibility:public modality:ABSTRACT [var] - $this: VALUE_PARAMETER name: type:.Base.Base> - VALUE_PARAMETER name: index:0 type:T of .Base - PROPERTY name:exn visibility:public modality:ABSTRACT [var] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT ($this:.Base.Base>, $receiver:Z of .Base.) returnType:T of .Base - correspondingProperty: PROPERTY name:exn visibility:public modality:ABSTRACT [var] - TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Base.Base> - $receiver: VALUE_PARAMETER name: type:Z of .Base. - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT ($this:.Base.Base>, $receiver:Z of .Base., :T of .Base) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:exn visibility:public modality:ABSTRACT [var] - TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Base.Base> - $receiver: VALUE_PARAMETER name: type:Z of .Base. - VALUE_PARAMETER name: index:0 type:T of .Base - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] - 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 [fake_override] - 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/stubs/genericClassInDifferentModule_m1.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m1.txt deleted file mode 100644 index 550fbf0e573..00000000000 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m1.txt +++ /dev/null @@ -1,57 +0,0 @@ -FILE fqName: fileName:/genericClassInDifferentModule_m1.kt - CLASS CLASS name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Base.Base> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> (x:T of .Base) returnType:.Base.Base> [primary] - VALUE_PARAMETER name:x index:0 type:T of .Base - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:T of .Base visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: T of .Base declared in .Base.' type=T of .Base origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Base.Base>) returnType:T of .Base - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Base.Base> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of .Base declared in .Base' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Base visibility:private [final]' type=T of .Base origin=null - receiver: GET_VAR ': .Base.Base> declared in .Base.' type=.Base.Base> origin=null - FUN name:foo visibility:public modality:ABSTRACT ($this:.Base.Base>, y:Y of .Base.foo) returnType:T of .Base - TYPE_PARAMETER name:Y index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Base.Base> - VALUE_PARAMETER name:y index:0 type:Y of .Base.foo - PROPERTY name:bar visibility:public modality:ABSTRACT [var] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Base.Base>) returnType:T of .Base - correspondingProperty: PROPERTY name:bar visibility:public modality:ABSTRACT [var] - $this: VALUE_PARAMETER name: type:.Base.Base> - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Base.Base>, :T of .Base) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:bar visibility:public modality:ABSTRACT [var] - $this: VALUE_PARAMETER name: type:.Base.Base> - VALUE_PARAMETER name: index:0 type:T of .Base - PROPERTY name:exn visibility:public modality:ABSTRACT [var] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT ($this:.Base.Base>, $receiver:Z of .Base.) returnType:T of .Base - correspondingProperty: PROPERTY name:exn visibility:public modality:ABSTRACT [var] - TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Base.Base> - $receiver: VALUE_PARAMETER name: type:Z of .Base. - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT ($this:.Base.Base>, $receiver:Z of .Base., :T of .Base) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:exn visibility:public modality:ABSTRACT [var] - TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Base.Base> - $receiver: VALUE_PARAMETER name: type:Z of .Base. - VALUE_PARAMETER name: index:0 type:T of .Base - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] 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 [fake_override] - 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 [fake_override] - 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/stubs/genericClassInDifferentModule_m2.fir.kt.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.kt.txt deleted file mode 100644 index 09a09d03532..00000000000 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.kt.txt +++ /dev/null @@ -1,24 +0,0 @@ -class Derived1 : Base { - constructor(x: T) /* primary */ { - super/*Base*/(x = x) - /* () */ - - } - - override fun foo(y: Y): T { - return .() - } - - override var bar: T - field = x - override get - override set - - override var Z.exn: T - override get(): T { - return .() - } - override set(value: T) { - } - -} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt index 410ff9b9c40..648532c3c0a 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt @@ -75,7 +75,10 @@ open class AbstractFir2IrTextTest : AbstractIrTextTestBase(FrontendKinds.FIR) { override fun configure(builder: TestConfigurationBuilder) { super.configure(builder) with(builder) { - useAfterAnalysisCheckers(::FirIrDumpIdenticalChecker) + useAfterAnalysisCheckers( + ::FirIrDumpIdenticalChecker, + ::BlackBoxCodegenSuppressor + ) } } }