From 60f9206d3bd2075beaf6666c790607a9fa141b69 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 5 Mar 2024 16:47:31 +0100 Subject: [PATCH] Fix test data for IR fake override tests --- .../intersectionListOverrideKJK.fir.ir.txt | 2 +- .../listOverrideOnComplexHierarchy.fir.ir.txt | 16 +- .../substitutionListOverrideKJJ.fir.ir.txt | 2 +- .../substitutionListOverrideKJK.fir.ir.txt | 4 +- ...ectionWithGenericMapOverrideKJK.fir.ir.txt | 4 +- ...ectionWithGenericMapOverrideKJK.fir.kt.txt | 2 +- .../map/substitutionMapOverrideKJJ.fir.ir.txt | 8 +- .../map/substitutionMapOverrideKJJ.fir.kt.txt | 4 +- .../map/substitutionMapOverrideKJK.fir.ir.txt | 8 +- .../map/substitutionMapOverrideKJK.fir.kt.txt | 4 +- .../substitutionMapOverrideOnKJKJ.fir.ir.txt | 8 +- .../substitutionMapOverrideOnKJKJ.fir.kt.txt | 4 +- .../basicGenericMethodsOverride.fir.ir.txt | 138 ------ .../basicGenericMethodsOverride.fir.kt.txt | 42 -- .../generics/basicGenericMethodsOverride.kt | 1 + .../basicGenericWithBoundsOverride.fir.ir.txt | 2 +- .../basicGenericWithBoundsOverride.fir.kt.txt | 2 +- ...ethodOverrideOnComplexHierarchy.fir.ir.txt | 26 +- ...ethodOverrideOnComplexHierarchy.fir.kt.txt | 26 +- .../genericMethodOverrideOnKJJ.fir.ir.txt | 252 ----------- .../genericMethodOverrideOnKJJ.fir.kt.txt | 77 ---- .../generics/genericMethodOverrideOnKJJ.kt | 1 + .../genericMethodOverrideOnKJK.fir.ir.txt | 270 ------------ .../genericMethodOverrideOnKJK.fir.kt.txt | 83 ---- .../generics/genericMethodOverrideOnKJK.kt | 1 + ...tersectionGenericMethodOverride.fir.ir.txt | 399 ------------------ ...tersectionGenericMethodOverride.fir.kt.txt | 111 ----- .../intersectionGenericMethodOverride.kt | 1 + ...llectionIntersectionOverrideKJK.fir.ir.txt | 10 +- ...uenceSetIntersectionOverrideKJK.fir.ir.txt | 8 +- .../kjkWithRawTypes.overrides.txt | 7 +- .../substitutionOperatorsOverride.fir.ir.txt | 2 +- ...onWithGenericOnComplexHierarchy.fir.ir.txt | 4 +- ...bstitutionOverrideOnCollections.fir.ir.txt | 24 +- ...bstitutionOverrideOnCollections.fir.kt.txt | 12 +- .../substitutionOverrideOnNothing.fir.ir.txt | 4 +- 36 files changed, 101 insertions(+), 1468 deletions(-) delete mode 100644 compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.fir.kt.txt diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/list/intersectionListOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/list/intersectionListOverrideKJK.fir.ir.txt index fcec33fd110..8a17c6f9ebd 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/list/intersectionListOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/list/intersectionListOverrideKJK.fir.ir.txt @@ -1291,7 +1291,7 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'c: .C declared in .test' type=.C origin=null p0: CONST Int type=kotlin.Int value=0 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun remove (): @[FlexibleNullability] kotlin.Int? declared in .C' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun remove (): @[FlexibleNullability] kotlin.Int? declared in .C' type=kotlin.Int? origin=null $this: GET_VAR 'c: .C declared in .test' type=.C origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] kotlin.Int? declared in .C' type=@[EnhancedNullability] kotlin.Int? origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/list/listOverrideOnComplexHierarchy.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/list/listOverrideOnComplexHierarchy.fir.ir.txt index dad3ca96f4d..51a6e3b021b 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/list/listOverrideOnComplexHierarchy.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/list/listOverrideOnComplexHierarchy.fir.ir.txt @@ -1325,15 +1325,15 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:fromIndex index:0 type:kotlin.Int VALUE_PARAMETER name:toIndex index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Any?>) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.AbstractCollection) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] overridden: public open fun toArray (): @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? declared in .Java1 - $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Any?> - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Any?>, p0:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array?) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.AbstractCollection, p0:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array?) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] overridden: public open fun toArray (p0: @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array?): @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? declared in .Java1 TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Any?> + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: @@ -1501,15 +1501,15 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:fromIndex index:0 type:kotlin.Int VALUE_PARAMETER name:toIndex index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Any?>) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.AbstractCollection) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] overridden: public open fun toArray (): @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? declared in .E - $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Any?> - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Any?>, p0:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array?) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.AbstractCollection, p0:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array?) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] overridden: public open fun toArray (p0: @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array?): @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? declared in .E TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Any?> + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/list/substitutionListOverrideKJJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/list/substitutionListOverrideKJJ.fir.ir.txt index d25972cebfe..4b62fb68462 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/list/substitutionListOverrideKJJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/list/substitutionListOverrideKJJ.fir.ir.txt @@ -437,7 +437,7 @@ FILE fqName: fileName:/1.kt p0: CONST Int type=kotlin.Int value=2 p1: CONST Int type=kotlin.Int value=2 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun get (p0: kotlin.Int): @[FlexibleNullability] @[EnhancedNullability] T of .B? declared in .B' type=@[EnhancedNullability] @[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun get (p0: kotlin.Int): @[FlexibleNullability] @[EnhancedNullability] T of .B? declared in .B' type=@[EnhancedNullability] kotlin.Int? origin=null $this: GET_VAR 'b: .B declared in .test' type=.B origin=null p0: CONST Int type=kotlin.Int value=1 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/list/substitutionListOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/list/substitutionListOverrideKJK.fir.ir.txt index 44f250afd5c..6ab16721a73 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/list/substitutionListOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/list/substitutionListOverrideKJK.fir.ir.txt @@ -394,7 +394,7 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'a: .A declared in .test' type=.A origin=null element: CONST Null type=kotlin.Nothing? value=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun get (index: kotlin.Int): @[FlexibleNullability] T of .A? declared in .A' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun get (index: kotlin.Int): @[FlexibleNullability] T of .A? declared in .A' type=kotlin.Int? origin=null $this: GET_VAR 'a: .A declared in .test' type=.A origin=null index: CONST Int type=kotlin.Int value=1 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit @@ -406,7 +406,7 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'a: .A declared in .test' type=.A origin=null element: CONST Null type=kotlin.Nothing? value=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public abstract fun removeAt (index: kotlin.Int): @[FlexibleNullability] T of .A? declared in .A' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public abstract fun removeAt (index: kotlin.Int): @[FlexibleNullability] T of .A? declared in .A' type=kotlin.Int? origin=null $this: GET_VAR 'a: .A declared in .test' type=.A origin=null index: CONST Int type=kotlin.Int value=1 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/intersectionWithGenericMapOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/intersectionWithGenericMapOverrideKJK.fir.ir.txt index e43607e3495..058d00a90ac 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/intersectionWithGenericMapOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/intersectionWithGenericMapOverrideKJK.fir.ir.txt @@ -468,8 +468,8 @@ FILE fqName: fileName:/1.kt key: CONST Boolean type=kotlin.Boolean value=false value: CONST Boolean type=kotlin.Boolean value=false CALL 'public final fun set (key: K of kotlin.collections.set, value: V of kotlin.collections.set): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Boolean? - : @[FlexibleNullability] kotlin.Boolean? + : kotlin.Boolean? + : kotlin.Boolean? $receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null key: CONST Boolean type=kotlin.Boolean value=true value: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/intersectionWithGenericMapOverrideKJK.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/intersectionWithGenericMapOverrideKJK.fir.kt.txt index 1ca8b71b92d..cbc723f30b1 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/intersectionWithGenericMapOverrideKJK.fir.kt.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/intersectionWithGenericMapOverrideKJK.fir.kt.txt @@ -34,6 +34,6 @@ fun test(a: A, b: B) { a.remove(key = true) /*~> Unit */ b.() /*~> Unit */ b.put(key = false, value = false) /*~> Unit */ - b.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = true, value = true) + b.set(key = true, value = true) b.remove(key = null) /*~> Unit */ } diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJJ.fir.ir.txt index b3934b16874..2c3e4b499fb 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJJ.fir.ir.txt @@ -444,14 +444,14 @@ FILE fqName: fileName:/1.kt key: CONST Null type=kotlin.Nothing? value=null value: CONST Null type=kotlin.Nothing? value=null CALL 'public final fun set (key: K of kotlin.collections.set, value: V of kotlin.collections.set): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Boolean? - : @[FlexibleNullability] kotlin.Boolean? + : kotlin.Boolean? + : kotlin.Boolean? $receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null key: CONST Null type=kotlin.Nothing? value=null value: CONST Null type=kotlin.Nothing? value=null CALL 'public final fun set (key: K of kotlin.collections.set, value: V of kotlin.collections.set): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Boolean? - : @[FlexibleNullability] kotlin.Boolean? + : kotlin.Boolean? + : kotlin.Boolean? $receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null key: CONST Boolean type=kotlin.Boolean value=true value: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJJ.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJJ.fir.kt.txt index 0d11a33f276..520c71c430d 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJJ.fir.kt.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJJ.fir.kt.txt @@ -39,8 +39,8 @@ fun test(a: A, b: B) { b.() /*~> Unit */ b.put(key = false, value = false) /*~> Unit */ b.put(key = null, value = null) /*~> Unit */ - b.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = null, value = null) - b.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = true, value = true) + b.set(key = null, value = null) + b.set(key = true, value = true) b.get(key = null) /*~> Unit */ b.get(key = true) /*~> Unit */ b.remove(key = null) /*~> Unit */ diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJK.fir.ir.txt index c322e38daa9..1d519a018c2 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJK.fir.ir.txt @@ -394,14 +394,14 @@ FILE fqName: fileName:/1.kt key: CONST Null type=kotlin.Nothing? value=null value: CONST Null type=kotlin.Nothing? value=null CALL 'public final fun set (key: K of kotlin.collections.set, value: V of kotlin.collections.set): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Boolean? - : @[FlexibleNullability] kotlin.Boolean? + : kotlin.Boolean? + : kotlin.Boolean? $receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null key: CONST Null type=kotlin.Nothing? value=null value: CONST Null type=kotlin.Nothing? value=null CALL 'public final fun set (key: K of kotlin.collections.set, value: V of kotlin.collections.set): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Boolean? - : @[FlexibleNullability] kotlin.Boolean? + : kotlin.Boolean? + : kotlin.Boolean? $receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null key: CONST Boolean type=kotlin.Boolean value=true value: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJK.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJK.fir.kt.txt index 3deff0fe63c..54ca3ee180f 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJK.fir.kt.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideKJK.fir.kt.txt @@ -35,8 +35,8 @@ fun test(a: A, b: B) { b.() /*~> Unit */ b.put(key = false, value = false) /*~> Unit */ b.put(key = null, value = null) /*~> Unit */ - b.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = null, value = null) - b.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = true, value = true) + b.set(key = null, value = null) + b.set(key = true, value = true) b.get(key = null) /*~> Unit */ b.get(key = true) /*~> Unit */ b.remove(key = null) /*~> Unit */ diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.ir.txt index 45922a6b09f..3383d0a1018 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.ir.txt @@ -640,14 +640,14 @@ FILE fqName: fileName:/1.kt key: CONST Null type=kotlin.Nothing? value=null value: CONST Null type=kotlin.Nothing? value=null CALL 'public final fun set (key: K of kotlin.collections.set, value: V of kotlin.collections.set): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Boolean? - : @[FlexibleNullability] kotlin.Boolean? + : kotlin.Boolean? + : kotlin.Boolean? $receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null key: CONST Null type=kotlin.Nothing? value=null value: CONST Null type=kotlin.Nothing? value=null CALL 'public final fun set (key: K of kotlin.collections.set, value: V of kotlin.collections.set): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Boolean? - : @[FlexibleNullability] kotlin.Boolean? + : kotlin.Boolean? + : kotlin.Boolean? $receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null key: CONST Boolean type=kotlin.Boolean value=true value: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.kt.txt index 5c924dff678..22427acb017 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.kt.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.kt.txt @@ -50,8 +50,8 @@ fun test(a: A, b: B) { b.() /*~> Unit */ b.put(key = false, value = false) /*~> Unit */ b.put(key = null, value = null) /*~> Unit */ - b.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = null, value = null) - b.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = true, value = true) + b.set(key = null, value = null) + b.set(key = true, value = true) b.get(key = null) /*~> Unit */ b.get(key = true) /*~> Unit */ b.remove(key = null) /*~> Unit */ diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.fir.ir.txt deleted file mode 100644 index 72d4dec24e4..00000000000 --- a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.fir.ir.txt +++ /dev/null @@ -1,138 +0,0 @@ -FILE fqName: fileName:/1.kt - CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.Java1] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> () returnType:.A [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.Java1]' - FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN ($this:.Java1) returnType:@[FlexibleNullability] T of .A.bar? [fake_override] - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - 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 declared in .Java1 - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN ($this:.Java1, a:@[FlexibleNullability] T of .A.foo?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] T of .A.foo? - 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 .Java1 - $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 .Java1 - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.Java1] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B - CONSTRUCTOR visibility:public <> () returnType:.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.Java1]' - 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 declared in .Java1 - $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 .Java1 - $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 .Java1 - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:bar visibility:public modality:OPEN ($this:.B) returnType:T of .B.bar? - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] reified:false - $this: VALUE_PARAMETER name: type:.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun bar (): T of .B.bar? declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL - : kotlin.Nothing - arg0: CONST Null type=kotlin.Nothing? value=null - FUN name:foo visibility:public modality:OPEN ($this:.B, a:T of .B.foo?) returnType:kotlin.Unit - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] reified:false - $this: VALUE_PARAMETER name: type:.B - VALUE_PARAMETER name:a index:0 type:T of .B.foo? - BLOCK_BODY - FUN name:test visibility:public modality:FINAL <> (a:.A, b:.B) returnType:kotlin.Unit - VALUE_PARAMETER name:a index:0 type:.A - VALUE_PARAMETER name:b index:1 type:.B - BLOCK_BODY - VAR name:k type:kotlin.Int [val] - TYPE_OP type=kotlin.Int origin=IMPLICIT_NOTNULL typeOperand=kotlin.Int - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Int? origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - VAR name:k2 type:kotlin.Int? [val] - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Int? origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - VAR name:k3 type:kotlin.Any [val] - TYPE_OP type=kotlin.Any origin=IMPLICIT_NOTNULL typeOperand=kotlin.Any - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Any? origin=null - : @[FlexibleNullability] kotlin.Any? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - VAR name:k4 type:kotlin.Nothing [val] - TYPE_OP type=kotlin.Nothing origin=IMPLICIT_NOTNULL typeOperand=kotlin.Nothing - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Nothing? origin=null - : @[FlexibleNullability] kotlin.Nothing? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.collections.List? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k5 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .B.bar? declared in .B' type=kotlin.Int? origin=null - : kotlin.Int - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - VAR name:k7 type:kotlin.Any? [val] - CALL 'public open fun bar (): T of .B.bar? declared in .B' type=kotlin.Any? origin=null - : kotlin.Any - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - VAR name:k8 type:kotlin.Nothing? [val] - CALL 'public open fun bar (): T of .B.bar? declared in .B' type=kotlin.Nothing? origin=null - : kotlin.Nothing - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - CALL 'public open fun foo (a: T of .B.foo?): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: T of .B.foo?): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Nothing - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .B.foo?): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .B.foo?): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.fir.kt.txt deleted file mode 100644 index c53c8422e80..00000000000 --- a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.fir.kt.txt +++ /dev/null @@ -1,42 +0,0 @@ -class A : Java1 { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - -} - -class B : Java1 { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - - override fun bar(): T? { - return CHECK_NOT_NULL(arg0 = null) - } - - override fun foo(a: T?) { - } - -} - -fun test(a: A, b: B) { - val k: Int = a.bar<@FlexibleNullability Int?>() /*!! Int */ - val k2: Int? = a.bar<@FlexibleNullability Int?>() - val k3: Any = a.bar<@FlexibleNullability Any?>() /*!! Any */ - val k4: Nothing = a.bar<@FlexibleNullability Nothing?>() /*!! Nothing */ - a.foo<@FlexibleNullability Int?>(a = 1) - a.foo<@FlexibleNullability Nothing?>(a = null) - a.foo(a = null) - a.foo<@FlexibleNullability List?>(a = listOf(element = null)) - val k5: Int? = b.bar() - val k7: Any? = b.bar() - val k8: Nothing? = b.bar() - b.foo(a = 1) - b.foo(a = null) - b.foo(a = null) - b.foo>(a = listOf(element = null)) -} diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.kt b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.kt index d9d7ee4993a..ba1532fc556 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.kt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericMethodsOverride.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // TARGET_BACKEND: JVM // FULL_JDK // WITH_STDLIB diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.ir.txt index 688fa849d19..0452139123e 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.ir.txt @@ -234,7 +234,7 @@ FILE fqName: fileName:/1.kt a: CONST Int type=kotlin.Int value=1 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public abstract fun bar (): @[FlexibleNullability] U of .E.bar? declared in .E' type=@[FlexibleNullability] kotlin.Int? origin=null - : kotlin.Int + : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'e: .E declared in .test' type=.E origin=null CALL 'public open fun foo (a: U of .F.foo): kotlin.Unit declared in .F' type=kotlin.Unit origin=null : kotlin.Double diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.kt.txt index e28158dab96..f0c9a57fa4c 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.kt.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.kt.txt @@ -86,7 +86,7 @@ fun test(a: A, b: B, c: C, d: D, e: E, f: F) { d.foo(t = 1.1) d.bar() /*~> Unit */ e.foo<@FlexibleNullability Int?>(a = 1) - e.bar() /*~> Unit */ + e.bar<@FlexibleNullability Int?>() /*~> Unit */ f.foo(a = 2.2) f.bar() /*~> Unit */ } diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.ir.txt index 988612bb38a..d2ceeecf618 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.ir.txt @@ -525,11 +525,11 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'a: .A declared in .test' type=.A origin=null a: CONST Int type=kotlin.Int value=1 CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? + : kotlin.Nothing? $this: GET_VAR 'a: .A declared in .test' type=.A origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'a: .A declared in .test' type=.A origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null @@ -655,11 +655,11 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'f: .F declared in .test' type=.F origin=null a: CONST Int type=kotlin.Int value=1 CALL 'public open fun foo (a: @[FlexibleNullability] T of .F.foo?): kotlin.Unit declared in .F' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? + : kotlin.Nothing? $this: GET_VAR 'f: .F declared in .test' type=.F origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .F.foo?): kotlin.Unit declared in .F' type=kotlin.Unit origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'f: .F declared in .test' type=.F origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .F.foo?): kotlin.Unit declared in .F' type=kotlin.Unit origin=null @@ -681,11 +681,11 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'g: .G declared in .test' type=.G origin=null a: CONST Int type=kotlin.Int value=1 CALL 'public open fun foo (a: @[FlexibleNullability] T of .G.foo?): kotlin.Unit declared in .G' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? + : kotlin.Nothing? $this: GET_VAR 'g: .G declared in .test' type=.G origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .G.foo?): kotlin.Unit declared in .G' type=kotlin.Unit origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'g: .G declared in .test' type=.G origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .G.foo?): kotlin.Unit declared in .G' type=kotlin.Unit origin=null @@ -707,11 +707,11 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'h: .H declared in .test' type=.H origin=null a: CONST Int type=kotlin.Int value=1 CALL 'public open fun foo (a: @[FlexibleNullability] T of .H.foo?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? + : kotlin.Nothing? $this: GET_VAR 'h: .H declared in .test' type=.H origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .H.foo?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'h: .H declared in .test' type=.H origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .H.foo?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null @@ -748,23 +748,23 @@ FILE fqName: fileName:/1.kt element: CONST Null type=kotlin.Nothing? value=null VAR name:k21 type:kotlin.Int? [val] CALL 'public open fun bar (): @[FlexibleNullability] T of .J.bar? declared in .J' type=@[FlexibleNullability] kotlin.Int? origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'j: .J declared in .test' type=.J origin=null VAR name:k22 type:kotlin.Any [val] TYPE_OP type=kotlin.Any origin=IMPLICIT_NOTNULL typeOperand=kotlin.Any CALL 'public open fun bar (): @[FlexibleNullability] T of .J.bar? declared in .J' type=@[FlexibleNullability] kotlin.Any? origin=null - : kotlin.Any + : @[FlexibleNullability] kotlin.Any? $this: GET_VAR 'j: .J declared in .test' type=.J origin=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .J.foo?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'j: .J declared in .test' type=.J origin=null a: CONST Int type=kotlin.Int value=1 CALL 'public open fun foo (a: @[FlexibleNullability] T of .J.foo?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? + : kotlin.Nothing? $this: GET_VAR 'j: .J declared in .test' type=.J origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .J.foo?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'j: .J declared in .test' type=.J origin=null a: CONST Null type=kotlin.Nothing? value=null CALL 'public open fun foo (a: @[FlexibleNullability] T of .J.foo?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null @@ -779,5 +779,5 @@ FILE fqName: fileName:/1.kt a: CONST Int type=kotlin.Int value=1 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public open fun bar (): @[FlexibleNullability] T of .L.bar? declared in .L' type=@[FlexibleNullability] kotlin.Int? origin=null - : kotlin.Int + : @[FlexibleNullability] kotlin.Int? $this: GET_VAR 'l: .L declared in .test' type=.L origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.kt.txt index 7b525a19b51..19538b4c8b1 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.kt.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.kt.txt @@ -155,8 +155,8 @@ fun test(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, l: L) { val k: Int = a.bar() val k3: Any = a.bar() a.foo<@FlexibleNullability Int?>(a = 1) - a.foo<@FlexibleNullability Nothing?>(a = null) - a.foo(a = null) + a.foo(a = null) + a.foo<@FlexibleNullability Int?>(a = null) a.foo<@FlexibleNullability List?>(a = listOf(element = null)) val k5: Int? = b.bar() val k6: Any = b.bar() @@ -185,20 +185,20 @@ fun test(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, l: L) { val k13: Int? = f.bar() val k14: Any = f.bar() f.foo<@FlexibleNullability Int?>(a = 1) - f.foo<@FlexibleNullability Nothing?>(a = null) - f.foo(a = null) + f.foo(a = null) + f.foo<@FlexibleNullability Int?>(a = null) f.foo<@FlexibleNullability List?>(a = listOf(element = null)) val k15: Int? = g.bar() val k16: Any = g.bar() g.foo<@FlexibleNullability Int?>(a = 1) - g.foo<@FlexibleNullability Nothing?>(a = null) - g.foo(a = null) + g.foo(a = null) + g.foo<@FlexibleNullability Int?>(a = null) g.foo<@FlexibleNullability List?>(a = listOf(element = null)) val k17: Int? = h.bar() val k18: Any = h.bar() h.foo<@FlexibleNullability Int?>(a = 1) - h.foo<@FlexibleNullability Nothing?>(a = null) - h.foo(a = null) + h.foo(a = null) + h.foo<@FlexibleNullability Int?>(a = null) h.foo<@FlexibleNullability List?>(a = listOf(element = null)) val k19: Int? = i.bar() val k20: Any = i.bar() @@ -206,12 +206,12 @@ fun test(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, l: L) { i.foo(a = null) i.foo(a = null) i.foo>(a = listOf(element = null)) - val k21: Int? = j.bar() - val k22: Any = j.bar() /*!! Any */ + val k21: Int? = j.bar<@FlexibleNullability Int?>() + val k22: Any = j.bar<@FlexibleNullability Any?>() /*!! Any */ j.foo<@FlexibleNullability Int?>(a = 1) - j.foo<@FlexibleNullability Nothing?>(a = null) - j.foo(a = null) + j.foo(a = null) + j.foo<@FlexibleNullability Int?>(a = null) j.foo<@FlexibleNullability List?>(a = listOf(element = null)) l.foo(a = 1) - l.bar() /*~> Unit */ + l.bar<@FlexibleNullability Int?>() /*~> Unit */ } diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.fir.ir.txt deleted file mode 100644 index f0837fd6fd5..00000000000 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.fir.ir.txt +++ /dev/null @@ -1,252 +0,0 @@ -FILE fqName: fileName:/1.kt - CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[.Java2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> () returnType:.A [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java2' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[.Java2]' - FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN ($this:.Java1) returnType:@[FlexibleNullability] T of .A.bar? [fake_override] - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java2.bar? declared in .Java2 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - 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 declared in .Java2 - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN ($this:.Java1, a:@[FlexibleNullability] T of .A.foo?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java2.foo?): kotlin.Unit declared in .Java2 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] T of .A.foo? - 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 .Java2 - $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 .Java2 - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.A] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B - CONSTRUCTOR visibility:public <> () returnType:.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .A' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.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 declared in .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 declared in .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 declared in .A - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:bar visibility:public modality:OPEN ($this:.B) returnType:T of .B.bar - overridden: - public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun bar (): T of .B.bar declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL - : kotlin.Nothing - arg0: CONST Null type=kotlin.Nothing? value=null - FUN name:foo visibility:public modality:OPEN ($this:.B, a:T of .B.foo) returnType:kotlin.Unit - overridden: - public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.B - VALUE_PARAMETER name:a index:0 type:T of .B.foo - BLOCK_BODY - CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.Java3] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C - CONSTRUCTOR visibility:public <> () returnType:.C [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java3' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.Java3]' - FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN ($this:.Java3) returnType:@[FlexibleNullability] T of .C.bar? [fake_override] - annotations: - Override - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java3.bar? declared in .Java3 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java3 - 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 declared in .Java3 - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN ($this:.Java3, a:@[FlexibleNullability] T of .C.foo?) returnType:kotlin.Unit [fake_override] - annotations: - Override - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java3.foo?): kotlin.Unit declared in .Java3 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java3 - VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] T of .C.foo? - 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 .Java3 - $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 .Java3 - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:D modality:FINAL visibility:public superTypes:[.Java1] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.D - CONSTRUCTOR visibility:public <> () returnType:.D [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:D modality:FINAL visibility:public superTypes:[.Java1]' - 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 declared in .Java1 - $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 .Java1 - $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 .Java1 - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:bar visibility:public modality:OPEN ($this:.D) returnType:T of .D.bar - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.D - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun bar (): T of .D.bar declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL - : kotlin.Nothing - arg0: CONST Null type=kotlin.Nothing? value=null - FUN name:foo visibility:public modality:OPEN ($this:.D, a:T of .D.foo) returnType:kotlin.Unit - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.D - VALUE_PARAMETER name:a index:0 type:T of .D.foo - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null - message: GET_VAR 'a: T of .D.foo declared in .D.foo' type=T of .D.foo origin=null - FUN name:test visibility:public modality:FINAL <> (a:.A, b:.B, c:.C, d:.D) returnType:kotlin.Unit - VALUE_PARAMETER name:a index:0 type:.A - VALUE_PARAMETER name:b index:1 type:.B - VALUE_PARAMETER name:c index:2 type:.C - VALUE_PARAMETER name:d index:3 type:.D - BLOCK_BODY - VAR name:k type:kotlin.Int [val] - TYPE_OP type=kotlin.Int origin=IMPLICIT_NOTNULL typeOperand=kotlin.Int - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Int? origin=null - : kotlin.Int - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - VAR name:k3 type:kotlin.Any [val] - TYPE_OP type=kotlin.Any origin=IMPLICIT_NOTNULL typeOperand=kotlin.Any - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Any? origin=null - : @[FlexibleNullability] kotlin.Any? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.collections.List? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k5 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .B.bar declared in .B' type=kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - VAR name:k6 type:kotlin.Any [val] - CALL 'public open fun bar (): T of .B.bar declared in .B' type=kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Nothing? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k7 type:kotlin.Int? [val] - CALL 'public open fun bar (): @[FlexibleNullability] T of .C.bar? declared in .C' type=@[FlexibleNullability] kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - VAR name:k8 type:kotlin.Any [val] - TYPE_OP type=kotlin.Any origin=IMPLICIT_NOTNULL typeOperand=kotlin.Any - CALL 'public open fun bar (): @[FlexibleNullability] T of .C.bar? declared in .C' type=@[FlexibleNullability] kotlin.Any? origin=null - : kotlin.Any - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .C.foo?): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: @[FlexibleNullability] T of .C.foo?): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .C.foo?): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .C.foo?): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.collections.List? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k9 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .D.bar declared in .D' type=kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - VAR name:k10 type:kotlin.Any [val] - CALL 'public open fun bar (): T of .D.bar declared in .D' type=kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Nothing? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.fir.kt.txt deleted file mode 100644 index 9f81ac46df5..00000000000 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.fir.kt.txt +++ /dev/null @@ -1,77 +0,0 @@ -abstract class A : Java2 { - constructor() /* primary */ { - super/*Java2*/() - /* () */ - - } - -} - -class B : A { - constructor() /* primary */ { - super/*A*/() - /* () */ - - } - - override fun bar(): T { - return CHECK_NOT_NULL(arg0 = null) - } - - override fun foo(a: T) { - } - -} - -class C : Java3 { - constructor() /* primary */ { - super/*Java3*/() - /* () */ - - } - -} - -class D : Java1 { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - - override fun bar(): T { - return CHECK_NOT_NULL(arg0 = null) - } - - override fun foo(a: T) { - println(message = a) - } - -} - -fun test(a: A, b: B, c: C, d: D) { - val k: Int = a.bar() /*!! Int */ - val k3: Any = a.bar<@FlexibleNullability Any?>() /*!! Any */ - a.foo<@FlexibleNullability Int?>(a = 1) - a.foo<@FlexibleNullability Nothing?>(a = null) - a.foo(a = null) - a.foo<@FlexibleNullability List?>(a = listOf(element = null)) - val k5: Int? = b.bar() - val k6: Any = b.bar() - b.foo(a = 1) - b.foo(a = null) - b.foo(a = null) - b.foo>(a = listOf(element = null)) - val k7: Int? = c.bar() - val k8: Any = c.bar() /*!! Any */ - c.foo<@FlexibleNullability Int?>(a = 1) - c.foo<@FlexibleNullability Nothing?>(a = null) - c.foo(a = null) - c.foo<@FlexibleNullability List?>(a = listOf(element = null)) - val k9: Int? = d.bar() - val k10: Any = d.bar() - d.foo(a = 1) - d.foo(a = null) - d.foo(a = null) - d.foo>(a = listOf(element = null)) -} diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.kt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.kt index 321d042aace..d9a0a635d9d 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.kt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJJ.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // TARGET_BACKEND: JVM // WITH_STDLIB diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.fir.ir.txt deleted file mode 100644 index 50b283b9597..00000000000 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.fir.ir.txt +++ /dev/null @@ -1,270 +0,0 @@ -FILE fqName: fileName:/1.kt - CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[.Java2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> () returnType:.A [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[.Java2]' - FUN FAKE_OVERRIDE name:bar visibility:public modality:ABSTRACT ($this:.KotlinInterface) returnType:T of .A.bar [fake_override] - overridden: - public abstract fun bar (): T of .Java2.bar declared in .Java2 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.KotlinInterface - 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 declared in .Java2 - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:ABSTRACT ($this:.KotlinInterface, a:T of .A.foo) returnType:kotlin.Unit [fake_override] - overridden: - public abstract fun foo (a: T of .Java2.foo): kotlin.Unit declared in .Java2 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.KotlinInterface - VALUE_PARAMETER name:a index:0 type:T of .A.foo - 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 .Java2 - $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 .Java2 - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.A] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B - CONSTRUCTOR visibility:public <> () returnType:.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .A' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.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 declared in .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 declared in .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 declared in .A - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:bar visibility:public modality:OPEN ($this:.B) returnType:T of .B.bar - overridden: - public abstract fun bar (): T of .A.bar declared in .A - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun bar (): T of .B.bar declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL - : kotlin.Nothing - arg0: CONST Null type=kotlin.Nothing? value=null - FUN name:foo visibility:public modality:OPEN ($this:.B, a:T of .B.foo) returnType:kotlin.Unit - overridden: - public abstract fun foo (a: T of .A.foo): kotlin.Unit declared in .A - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.B - VALUE_PARAMETER name:a index:0 type:T of .B.foo - BLOCK_BODY - CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.Java1] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C - CONSTRUCTOR visibility:public <> () returnType:.C [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.Java1]' - FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN ($this:.Java1) returnType:@[EnhancedNullability] T of .C.bar [fake_override] - annotations: - Override - overridden: - public open fun bar (): @[EnhancedNullability] T of .Java1.bar declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - 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 declared in .Java1 - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN ($this:.Java1, a:@[EnhancedNullability] T of .C.foo) returnType:kotlin.Unit [fake_override] - annotations: - Override - overridden: - public open fun foo (a: @[EnhancedNullability] T of .Java1.foo): kotlin.Unit declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - VALUE_PARAMETER name:a index:0 type:@[EnhancedNullability] T of .C.foo - 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 .Java1 - $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 .Java1 - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:D modality:FINAL visibility:public superTypes:[.Java1] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.D - CONSTRUCTOR visibility:public <> () returnType:.D [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:D modality:FINAL visibility:public superTypes:[.Java1]' - 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 declared in .Java1 - $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 .Java1 - $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 .Java1 - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:bar visibility:public modality:OPEN ($this:.D) returnType:T of .D.bar - overridden: - public open fun bar (): @[EnhancedNullability] T of .Java1.bar declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.D - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun bar (): T of .D.bar declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL - : kotlin.Nothing - arg0: CONST Null type=kotlin.Nothing? value=null - FUN name:foo visibility:public modality:OPEN ($this:.D, a:T of .D.foo) returnType:kotlin.Unit - overridden: - public open fun foo (a: @[EnhancedNullability] T of .Java1.foo): kotlin.Unit declared in .Java1 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.D - VALUE_PARAMETER name:a index:0 type:T of .D.foo - BLOCK_BODY - CLASS INTERFACE name:KotlinInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.KotlinInterface - 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 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 - FUN name:bar visibility:public modality:ABSTRACT ($this:.KotlinInterface) returnType:T of .KotlinInterface.bar - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.KotlinInterface - FUN name:foo visibility:public modality:ABSTRACT ($this:.KotlinInterface, a:T of .KotlinInterface.foo) returnType:kotlin.Unit - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.KotlinInterface - VALUE_PARAMETER name:a index:0 type:T of .KotlinInterface.foo - FUN name:test visibility:public modality:FINAL <> (a:.A, b:.B, c:.C, d:.D) returnType:kotlin.Unit - VALUE_PARAMETER name:a index:0 type:.A - VALUE_PARAMETER name:b index:1 type:.B - VALUE_PARAMETER name:c index:2 type:.C - VALUE_PARAMETER name:d index:3 type:.D - BLOCK_BODY - VAR name:k type:kotlin.Int [val] - CALL 'public abstract fun bar (): T of .A.bar declared in .A' type=kotlin.Int origin=null - : kotlin.Int - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - VAR name:k3 type:kotlin.Any [val] - CALL 'public abstract fun bar (): T of .A.bar declared in .A' type=kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - CALL 'public abstract fun foo (a: T of .A.foo): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public abstract fun foo (a: T of .A.foo): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : kotlin.Nothing? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public abstract fun foo (a: T of .A.foo): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public abstract fun foo (a: T of .A.foo): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k5 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .B.bar declared in .B' type=kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - VAR name:k6 type:kotlin.Any [val] - CALL 'public open fun bar (): T of .B.bar declared in .B' type=kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Nothing? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k7 type:kotlin.Int? [val] - CALL 'public open fun bar (): @[EnhancedNullability] T of .C.bar declared in .C' type=@[EnhancedNullability] kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - VAR name:k8 type:kotlin.Any [val] - TYPE_OP type=kotlin.Any origin=IMPLICIT_NOTNULL typeOperand=kotlin.Any - CALL 'public open fun bar (): @[EnhancedNullability] T of .C.bar declared in .C' type=@[EnhancedNullability] kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - CALL 'public open fun foo (a: @[EnhancedNullability] T of .C.foo): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: @[EnhancedNullability] T of .C.foo): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : kotlin.Nothing? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[EnhancedNullability] T of .C.foo): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[EnhancedNullability] T of .C.foo): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k9 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .D.bar declared in .D' type=kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - VAR name:k10 type:kotlin.Any [val] - CALL 'public open fun bar (): T of .D.bar declared in .D' type=kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Nothing? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.fir.kt.txt deleted file mode 100644 index 8f78c964747..00000000000 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.fir.kt.txt +++ /dev/null @@ -1,83 +0,0 @@ -abstract class A : Java2 { - constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - -} - -class B : A { - constructor() /* primary */ { - super/*A*/() - /* () */ - - } - - override fun bar(): T { - return CHECK_NOT_NULL(arg0 = null) - } - - override fun foo(a: T) { - } - -} - -class C : Java1 { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - -} - -class D : Java1 { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - - override fun bar(): T { - return CHECK_NOT_NULL(arg0 = null) - } - - override fun foo(a: T) { - } - -} - -interface KotlinInterface { - abstract fun bar(): T - - abstract fun foo(a: T) - -} - -fun test(a: A, b: B, c: C, d: D) { - val k: Int = a.bar() - val k3: Any = a.bar() - a.foo(a = 1) - a.foo(a = null) - a.foo(a = null) - a.foo>(a = listOf(element = null)) - val k5: Int? = b.bar() - val k6: Any = b.bar() - b.foo(a = 1) - b.foo(a = null) - b.foo(a = null) - b.foo>(a = listOf(element = null)) - val k7: Int? = c.bar() - val k8: Any = c.bar() /*!! Any */ - c.foo(a = 1) - c.foo(a = null) - c.foo(a = null) - c.foo>(a = listOf(element = null)) - val k9: Int? = d.bar() - val k10: Any = d.bar() - d.foo(a = 1) - d.foo(a = null) - d.foo(a = null) - d.foo>(a = listOf(element = null)) -} diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.kt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.kt index 5992f7cf0b9..4195557c6fb 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.kt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnKJK.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // TARGET_BACKEND: JVM // WITH_STDLIB diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.fir.ir.txt deleted file mode 100644 index 0a6a8acb313..00000000000 --- a/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.fir.ir.txt +++ /dev/null @@ -1,399 +0,0 @@ -FILE fqName: fileName:/1.kt - CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.Java1; .Java2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> () returnType:.A [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.Java1; .Java2]' - FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN ($this:.Java1) returnType:@[FlexibleNullability] T of .A.bar? [fake_override] - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - public abstract fun bar (): @[FlexibleNullability] T of .Java2.bar? declared in .Java2 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - 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 declared in .Java1 - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Java2 - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN ($this:.Java1, a:@[FlexibleNullability] T of .A.foo?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - public abstract fun foo (a: @[FlexibleNullability] T of .Java2.foo?): kotlin.Unit declared in .Java2 - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] T of .A.foo? - 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 .Java1 - public open fun hashCode (): kotlin.Int declared in .Java2 - $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 .Java1 - public open fun toString (): kotlin.String declared in .Java2 - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.Java1; .Java2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B - CONSTRUCTOR visibility:public <> () returnType:.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.Java1; .Java2]' - 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 declared in .Java1 - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Java2 - $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 .Java1 - public open fun hashCode (): kotlin.Int declared in .Java2 - $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 .Java1 - public open fun toString (): kotlin.String declared in .Java2 - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:bar visibility:public modality:OPEN ($this:.B) returnType:T of .B.bar - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - public abstract fun bar (): @[FlexibleNullability] T of .Java2.bar? declared in .Java2 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun bar (): T of .B.bar declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL - : kotlin.Nothing - arg0: CONST Null type=kotlin.Nothing? value=null - FUN name:foo visibility:public modality:OPEN ($this:.B, a:T of .B.foo) returnType:kotlin.Unit - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - public abstract fun foo (a: @[FlexibleNullability] T of .Java2.foo?): kotlin.Unit declared in .Java2 - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.B - VALUE_PARAMETER name:a index:0 type:T of .B.foo - BLOCK_BODY - CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[.Java1; .KotlinInterface] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C - CONSTRUCTOR visibility:public <> () returnType:.C [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[.Java1; .KotlinInterface]' - FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN ($this:.KotlinInterface) returnType:T of .C.bar [fake_override] - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - public abstract fun bar (): T of .KotlinInterface.bar declared in .KotlinInterface - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.KotlinInterface - 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 declared in .Java1 - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .KotlinInterface - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN ($this:.Java1, a:@[FlexibleNullability] T of .C.foo?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - public abstract fun foo (a: T of .KotlinInterface.foo): kotlin.Unit declared in .KotlinInterface - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] T of .C.foo? - 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 .Java1 - public open fun hashCode (): kotlin.Int declared in .KotlinInterface - $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 .Java1 - public open fun toString (): kotlin.String declared in .KotlinInterface - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:D modality:FINAL visibility:public superTypes:[.Java1; .KotlinInterface] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.D - CONSTRUCTOR visibility:public <> () returnType:.D [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:D modality:FINAL visibility:public superTypes:[.Java1; .KotlinInterface]' - 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 declared in .Java1 - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .KotlinInterface - $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 .Java1 - public open fun hashCode (): kotlin.Int declared in .KotlinInterface - $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 .Java1 - public open fun toString (): kotlin.String declared in .KotlinInterface - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:bar visibility:public modality:OPEN ($this:.D) returnType:T of .D.bar - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - public abstract fun bar (): T of .KotlinInterface.bar declared in .KotlinInterface - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.D - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun bar (): T of .D.bar declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL - : kotlin.Nothing - arg0: CONST Null type=kotlin.Nothing? value=null - FUN name:foo visibility:public modality:OPEN ($this:.D, a:T of .D.foo) returnType:kotlin.Unit - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - public abstract fun foo (a: T of .KotlinInterface.foo): kotlin.Unit declared in .KotlinInterface - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.D - VALUE_PARAMETER name:a index:0 type:T of .D.foo - BLOCK_BODY - CLASS CLASS name:E modality:FINAL visibility:public superTypes:[.Java1; .Java2; .KotlinInterface] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.E - CONSTRUCTOR visibility:public <> () returnType:.E [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:E modality:FINAL visibility:public superTypes:[.Java1; .Java2; .KotlinInterface]' - FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN ($this:.KotlinInterface) returnType:T of .E.bar [fake_override] - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - public abstract fun bar (): @[FlexibleNullability] T of .Java2.bar? declared in .Java2 - public abstract fun bar (): T of .KotlinInterface.bar declared in .KotlinInterface - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.KotlinInterface - 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 declared in .Java1 - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Java2 - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .KotlinInterface - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN ($this:.Java1, a:@[FlexibleNullability] T of .E.foo?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - public abstract fun foo (a: @[FlexibleNullability] T of .Java2.foo?): kotlin.Unit declared in .Java2 - public abstract fun foo (a: T of .KotlinInterface.foo): kotlin.Unit declared in .KotlinInterface - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] T of .E.foo? - 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 .Java1 - public open fun hashCode (): kotlin.Int declared in .Java2 - public open fun hashCode (): kotlin.Int declared in .KotlinInterface - $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 .Java1 - public open fun toString (): kotlin.String declared in .Java2 - public open fun toString (): kotlin.String declared in .KotlinInterface - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:F modality:FINAL visibility:public superTypes:[.Java1; .Java2; .KotlinInterface] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.F - CONSTRUCTOR visibility:public <> () returnType:.F [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:F modality:FINAL visibility:public superTypes:[.Java1; .Java2; .KotlinInterface]' - 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 declared in .Java1 - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Java2 - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .KotlinInterface - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN ($this:.Java1, a:@[FlexibleNullability] T of .F.foo?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun foo (a: @[FlexibleNullability] T of .Java1.foo?): kotlin.Unit declared in .Java1 - public abstract fun foo (a: @[FlexibleNullability] T of .Java2.foo?): kotlin.Unit declared in .Java2 - public abstract fun foo (a: T of .KotlinInterface.foo): kotlin.Unit declared in .KotlinInterface - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.Java1 - VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] T of .F.foo? - 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 .Java1 - public open fun hashCode (): kotlin.Int declared in .Java2 - public open fun hashCode (): kotlin.Int declared in .KotlinInterface - $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 .Java1 - public open fun toString (): kotlin.String declared in .Java2 - public open fun toString (): kotlin.String declared in .KotlinInterface - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:bar visibility:public modality:OPEN ($this:.F) returnType:T of .F.bar - overridden: - public open fun bar (): @[FlexibleNullability] T of .Java1.bar? declared in .Java1 - public abstract fun bar (): @[FlexibleNullability] T of .Java2.bar? declared in .Java2 - public abstract fun bar (): T of .KotlinInterface.bar declared in .KotlinInterface - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.F - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun bar (): T of .F.bar declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL - : kotlin.Nothing - arg0: CONST Null type=kotlin.Nothing? value=null - CLASS INTERFACE name:KotlinInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.KotlinInterface - 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 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 - FUN name:bar visibility:public modality:ABSTRACT ($this:.KotlinInterface) returnType:T of .KotlinInterface.bar - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.KotlinInterface - FUN name:foo visibility:public modality:ABSTRACT ($this:.KotlinInterface, a:T of .KotlinInterface.foo) returnType:kotlin.Unit - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:.KotlinInterface - VALUE_PARAMETER name:a index:0 type:T of .KotlinInterface.foo - FUN name:test visibility:public modality:FINAL <> (a:.A, b:.B, c:.C, d:.D, e:.E, f:.F) returnType:kotlin.Unit - VALUE_PARAMETER name:a index:0 type:.A - VALUE_PARAMETER name:b index:1 type:.B - VALUE_PARAMETER name:c index:2 type:.C - VALUE_PARAMETER name:d index:3 type:.D - VALUE_PARAMETER name:e index:4 type:.E - VALUE_PARAMETER name:f index:5 type:.F - BLOCK_BODY - VAR name:k type:kotlin.Int [val] - TYPE_OP type=kotlin.Int origin=IMPLICIT_NOTNULL typeOperand=kotlin.Int - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - VAR name:k3 type:kotlin.Any [val] - TYPE_OP type=kotlin.Any origin=IMPLICIT_NOTNULL typeOperand=kotlin.Any - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Any? origin=null - : @[FlexibleNullability] kotlin.Any? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - VAR name:k4 type:kotlin.Nothing [val] - TYPE_OP type=kotlin.Nothing origin=IMPLICIT_NOTNULL typeOperand=kotlin.Nothing - CALL 'public open fun bar (): @[FlexibleNullability] T of .A.bar? declared in .A' type=@[FlexibleNullability] kotlin.Nothing? origin=null - : @[FlexibleNullability] kotlin.Nothing? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .A.foo?): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.collections.List? - $this: GET_VAR 'a: .A declared in .test' type=.A origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k5 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .B.bar declared in .B' type=kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - VAR name:k6 type:kotlin.Any [val] - CALL 'public open fun bar (): T of .B.bar declared in .B' type=kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Nothing? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .B.foo): kotlin.Unit declared in .B' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'b: .B declared in .test' type=.B origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k7 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .C.bar declared in .C' type=kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - VAR name:k8 type:kotlin.Any [val] - CALL 'public open fun bar (): T of .C.bar declared in .C' type=kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .C.foo?): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: @[FlexibleNullability] T of .C.foo?): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .C.foo?): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .C.foo?): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.collections.List? - $this: GET_VAR 'c: .C declared in .test' type=.C origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k9 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .D.bar declared in .D' type=kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - VAR name:k10 type:kotlin.Any [val] - CALL 'public open fun bar (): T of .D.bar declared in .D' type=kotlin.Any origin=null - : kotlin.Any - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Int - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Nothing? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.Int? - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CONST Null type=kotlin.Nothing? value=null - CALL 'public open fun foo (a: T of .D.foo): kotlin.Unit declared in .D' type=kotlin.Unit origin=null - : kotlin.collections.List - $this: GET_VAR 'd: .D declared in .test' type=.D origin=null - a: CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.Nothing? - element: CONST Null type=kotlin.Nothing? value=null - VAR name:k11 type:kotlin.Int? [val] - CALL 'public open fun bar (): T of .E.bar declared in .E' type=kotlin.Int? origin=null - : kotlin.Int? - $this: GET_VAR 'e: .E declared in .test' type=.E origin=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .E.foo?): kotlin.Unit declared in .E' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'e: .E declared in .test' type=.E origin=null - a: CONST Int type=kotlin.Int value=1 - CALL 'public open fun foo (a: @[FlexibleNullability] T of .E.foo?): kotlin.Unit declared in .E' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Nothing? - $this: GET_VAR 'e: .E declared in .test' type=.E origin=null - a: CONST Null type=kotlin.Nothing? value=null - VAR name:k12 type:kotlin.Any? [val] - CALL 'public open fun bar (): T of .F.bar declared in .F' type=kotlin.Any? origin=null - : kotlin.Any? - $this: GET_VAR 'f: .F declared in .test' type=.F origin=null - CALL 'public open fun foo (a: @[FlexibleNullability] T of .F.foo?): kotlin.Unit declared in .F' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? - $this: GET_VAR 'f: .F declared in .test' type=.F origin=null - a: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.fir.kt.txt deleted file mode 100644 index 98306961fb7..00000000000 --- a/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.fir.kt.txt +++ /dev/null @@ -1,111 +0,0 @@ -class A : Java1, Java2 { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - -} - -class B : Java1, Java2 { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - - override fun bar(): T { - return CHECK_NOT_NULL(arg0 = null) - } - - override fun foo(a: T) { - } - -} - -abstract class C : Java1, KotlinInterface { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - -} - -class D : Java1, KotlinInterface { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - - override fun bar(): T { - return CHECK_NOT_NULL(arg0 = null) - } - - override fun foo(a: T) { - } - -} - -class E : Java1, Java2, KotlinInterface { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - -} - -class F : Java1, Java2, KotlinInterface { - constructor() /* primary */ { - super/*Java1*/() - /* () */ - - } - - override fun bar(): T { - return CHECK_NOT_NULL(arg0 = null) - } - -} - -interface KotlinInterface { - abstract fun bar(): T - - abstract fun foo(a: T) - -} - -fun test(a: A, b: B, c: C, d: D, e: E, f: F) { - val k: Int = a.bar() /*!! Int */ - val k3: Any = a.bar<@FlexibleNullability Any?>() /*!! Any */ - val k4: Nothing = a.bar<@FlexibleNullability Nothing?>() /*!! Nothing */ - a.foo<@FlexibleNullability Int?>(a = 1) - a.foo<@FlexibleNullability Nothing?>(a = null) - a.foo(a = null) - a.foo<@FlexibleNullability List?>(a = listOf(element = null)) - val k5: Int? = b.bar() - val k6: Any = b.bar() - b.foo(a = 1) - b.foo(a = null) - b.foo(a = null) - b.foo>(a = listOf(element = null)) - val k7: Int? = c.bar() - val k8: Any = c.bar() - c.foo<@FlexibleNullability Int?>(a = 1) - c.foo<@FlexibleNullability Nothing?>(a = null) - c.foo(a = null) - c.foo<@FlexibleNullability List?>(a = listOf(element = null)) - val k9: Int? = d.bar() - val k10: Any = d.bar() - d.foo(a = 1) - d.foo(a = null) - d.foo(a = null) - d.foo>(a = listOf(element = null)) - val k11: Int? = e.bar() - e.foo<@FlexibleNullability Int?>(a = 1) - e.foo<@FlexibleNullability Nothing?>(a = null) - val k12: Any? = f.bar() - f.foo<@FlexibleNullability Int?>(a = 1) -} diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.kt b/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.kt index f2ce3fc2e18..9930d058424 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.kt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/intersectionGenericMethodOverride.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // TARGET_BACKEND: JVM // WITH_STDLIB diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionIntersectionOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionIntersectionOverrideKJK.fir.ir.txt index ca4180b633b..6c91b4f8ac9 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionIntersectionOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionIntersectionOverrideKJK.fir.ir.txt @@ -1381,7 +1381,7 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'c: .C declared in .test' type=.C origin=null p0: CONST Int type=kotlin.Int value=0 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun remove (): @[FlexibleNullability] kotlin.Int? declared in .C' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun remove (): @[FlexibleNullability] kotlin.Int? declared in .C' type=kotlin.Int? origin=null $this: GET_VAR 'c: .C declared in .test' type=.C origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] kotlin.Int? declared in .C' type=@[EnhancedNullability] kotlin.Int? origin=null @@ -1398,10 +1398,10 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'c: .C declared in .test' type=.C origin=null p0: CONST Null type=kotlin.Nothing? value=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun removeFirst (): @[FlexibleNullability] kotlin.Int? declared in .C' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun removeFirst (): @[FlexibleNullability] kotlin.Int? declared in .C' type=kotlin.Int? origin=null $this: GET_VAR 'c: .C declared in .test' type=.C origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun removeLast (): @[FlexibleNullability] kotlin.Int? declared in .C' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun removeLast (): @[FlexibleNullability] kotlin.Int? declared in .C' type=kotlin.Int? origin=null $this: GET_VAR 'c: .C declared in .test' type=.C origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public open fun (): kotlin.Int declared in .D' type=kotlin.Int origin=GET_PROPERTY @@ -1432,8 +1432,8 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'd: .D declared in .test' type=.D origin=null e: CONST Null type=kotlin.Nothing? value=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun removeFirst (): @[FlexibleNullability] kotlin.Int? declared in .D' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun removeFirst (): @[FlexibleNullability] kotlin.Int? declared in .D' type=kotlin.Int? origin=null $this: GET_VAR 'd: .D declared in .test' type=.D origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun removeLast (): @[FlexibleNullability] kotlin.Int? declared in .D' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun removeLast (): @[FlexibleNullability] kotlin.Int? declared in .D' type=kotlin.Int? origin=null $this: GET_VAR 'd: .D declared in .test' type=.D origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJK.fir.ir.txt index 819bc6edbf2..a09be117da5 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJK.fir.ir.txt @@ -790,16 +790,16 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'c: .C declared in .test' type=.C origin=null p0: CONST Null type=kotlin.Nothing? value=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun removeFirst (): @[FlexibleNullability] kotlin.Int? declared in .C' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun removeFirst (): @[FlexibleNullability] kotlin.Int? declared in .C' type=kotlin.Int? origin=null $this: GET_VAR 'c: .C declared in .test' type=.C origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun removeLast (): @[FlexibleNullability] kotlin.Int? declared in .C' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'public open fun removeLast (): @[FlexibleNullability] kotlin.Int? declared in .C' type=kotlin.Int? origin=null $this: GET_VAR 'c: .C declared in .test' type=.C origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun reversed (): @[FlexibleNullability] java.util.SortedSet<@[FlexibleNullability] kotlin.Int?>? declared in .C' type=@[FlexibleNullability] java.util.SortedSet<@[FlexibleNullability] kotlin.Int?>? origin=null + CALL 'public open fun reversed (): @[FlexibleNullability] java.util.SortedSet<@[FlexibleNullability] kotlin.Int?>? declared in .C' type=@[FlexibleNullability] java.util.SortedSet? origin=null $this: GET_VAR 'c: .C declared in .test' type=.C origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun getFirst (): @[FlexibleNullability] kotlin.Int? declared in .C' type=@[FlexibleNullability] kotlin.Int? origin=GET_PROPERTY + CALL 'public open fun getFirst (): @[FlexibleNullability] kotlin.Int? declared in .C' type=kotlin.Int? origin=GET_PROPERTY $this: GET_VAR 'c: .C declared in .test' type=.C origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public open fun reversed (): java.util.SortedSet? declared in .D' type=java.util.SortedSet? origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/kjkWithRawTypes.overrides.txt b/compiler/testData/ir/irText/fakeOverrides/kjkWithRawTypes.overrides.txt index a991712df95..cfd5b7481df 100644 --- a/compiler/testData/ir/irText/fakeOverrides/kjkWithRawTypes.overrides.txt +++ b/compiler/testData/ir/irText/fakeOverrides/kjkWithRawTypes.overrides.txt @@ -4,6 +4,7 @@ A: [SubstitutionOverride(DeclarationSite)]: public open override fun foo(t: R|kotlin/Number!|): R|kotlin/Unit| from Use site scope of /A [id: 0] [SubstitutionOverride(DeclarationSite)]: public open override fun foo(t: R|kotlin/Number!|): R|kotlin/Unit| from Java enhancement scope for /Java2 [id: 0] [SubstitutionOverride(DeclarationSite)]: public open override fun foo(t: R|kotlin/Number!|): R|kotlin/Unit| from Substitution scope for [Use site scope of /KotlinClass] for type Java2 [id: 0] - [SubstitutionOverride(DeclarationSite)]: public open override fun foo(t: R|ft|): R|kotlin/Unit| from Use site scope of /KotlinClass [id: 1] - [SubstitutionOverride(DeclarationSite)]: public open override fun foo(t: R|ft|): R|kotlin/Unit| from Substitution scope for [Java enhancement scope for /Java1] for type KotlinClass [id: 1] - [Enhancement]: public open fun foo(t: R|ft|): R|kotlin/Unit| from Java enhancement scope for /Java1 [id: 2] + [SubstitutionOverride(DeclarationSite)]: public open override fun foo(t: R|T!|): R|kotlin/Unit| from Use site scope of /KotlinClass [id: 1] + [SubstitutionOverride(DeclarationSite)]: public open override fun foo(t: R|T!|): R|kotlin/Unit| from Substitution scope for [Java enhancement scope for /Java1] for type KotlinClass [id: 1] + [Enhancement]: public open fun foo(t: R|T!|): R|kotlin/Unit| from Java enhancement scope for /Java1 [id: 2] + diff --git a/compiler/testData/ir/irText/fakeOverrides/operators/substitutionOperatorsOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/operators/substitutionOperatorsOverride.fir.ir.txt index 7432e5fbe9e..93b97e2169e 100644 --- a/compiler/testData/ir/irText/fakeOverrides/operators/substitutionOperatorsOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/operators/substitutionOperatorsOverride.fir.ir.txt @@ -89,7 +89,7 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'val a: .A declared in .test' type=.A origin=null i: CONST Int type=kotlin.Int value=1 VAR name:k2 type:kotlin.Int? [val] - CALL 'public open fun get (i: @[FlexibleNullability] kotlin.Int?): @[FlexibleNullability] kotlin.Int? declared in .A' type=@[FlexibleNullability] kotlin.Int? origin=GET_ARRAY_ELEMENT + CALL 'public open fun get (i: @[FlexibleNullability] kotlin.Int?): @[FlexibleNullability] kotlin.Int? declared in .A' type=kotlin.Int? origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val a: .A declared in .test' type=.A origin=null i: CONST Int type=kotlin.Int value=1 VAR name:b type:.B [val] diff --git a/compiler/testData/ir/irText/fakeOverrides/platformtypes/intersectionWithGenericOnComplexHierarchy.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/platformtypes/intersectionWithGenericOnComplexHierarchy.fir.ir.txt index 5440df5e43e..2800eaff865 100644 --- a/compiler/testData/ir/irText/fakeOverrides/platformtypes/intersectionWithGenericOnComplexHierarchy.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/platformtypes/intersectionWithGenericOnComplexHierarchy.fir.ir.txt @@ -497,7 +497,7 @@ FILE fqName: fileName:/1.kt CALL 'public open fun foo (): T of .C declared in .C' type=kotlin.Any origin=null $this: GET_VAR 'c: .C declared in .test' type=.C origin=null VAR name:k9 type:kotlin.Any? [val] - CALL 'public abstract fun (): @[FlexibleNullability] T of .D? declared in .D' type=@[FlexibleNullability] kotlin.Any? origin=GET_PROPERTY + CALL 'public abstract fun (): @[FlexibleNullability] T of .D? declared in .D' type=kotlin.Any? origin=GET_PROPERTY $this: GET_VAR 'd: .D declared in .test' type=.D origin=null CALL 'public abstract fun (: @[FlexibleNullability] T of .D?): kotlin.Unit declared in .D' type=kotlin.Unit origin=EQ $this: GET_VAR 'd: .D declared in .test' type=.D origin=null @@ -566,7 +566,7 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'h: .H declared in .test' type=.H origin=null o: CONST Null type=kotlin.Nothing? value=null VAR name:k26 type:kotlin.Any? [val] - CALL 'public abstract fun foo (): @[FlexibleNullability] T of .H? declared in .H' type=@[FlexibleNullability] kotlin.Any? origin=null + CALL 'public abstract fun foo (): @[FlexibleNullability] T of .H? declared in .H' type=kotlin.Any? origin=null $this: GET_VAR 'h: .H declared in .test' type=.H origin=null VAR name:k27 type:kotlin.Unit [val] CALL 'public open fun bar (o: T of .I): kotlin.Unit declared in .I' type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.ir.txt index 473390b18ee..cf66195a219 100644 --- a/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.ir.txt @@ -355,16 +355,16 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'a: .A declared in .test' type=.A origin=null c: GET_VAR 'val k3: kotlin.collections.MutableSet declared in .test' type=kotlin.collections.MutableSet origin=null VAR name:k19 type:kotlin.collections.MutableList [val] - TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?> origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?> - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] T of .Java1?>? visibility:public' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?>? origin=null + TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableList origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableList + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] T of .Java1?>? visibility:public' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList? origin=null receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null VAR name:k20 type:java.util.Queue [val] - TYPE_OP type=java.util.Queue<@[FlexibleNullability] kotlin.String?> origin=IMPLICIT_NOTNULL typeOperand=java.util.Queue<@[FlexibleNullability] kotlin.String?> - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:b type:@[FlexibleNullability] java.util.Queue<@[FlexibleNullability] T of .Java1?>? visibility:public' type=@[FlexibleNullability] java.util.Queue<@[FlexibleNullability] kotlin.String?>? origin=null + TYPE_OP type=java.util.Queue origin=IMPLICIT_NOTNULL typeOperand=java.util.Queue + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:b type:@[FlexibleNullability] java.util.Queue<@[FlexibleNullability] T of .Java1?>? visibility:public' type=@[FlexibleNullability] java.util.Queue? origin=null receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null VAR name:k21 type:kotlin.collections.MutableSet [val] - TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] kotlin.String?> origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] kotlin.String?> - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:c type:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] T of .Java1?>? visibility:public' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] kotlin.String?>? origin=null + TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableSet origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableSet + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:c type:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] T of .Java1?>? visibility:public' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableSet? origin=null receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] T of .Java1?>? visibility:public' type=kotlin.Unit origin=EQ receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null @@ -379,16 +379,16 @@ FILE fqName: fileName:/1.kt value: CALL 'public final fun mutableSetOf (): kotlin.collections.MutableSet declared in kotlin.collections' type=kotlin.collections.MutableSet origin=null : kotlin.String? VAR name:k22 type:kotlin.collections.MutableList [val] - TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?> origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?> - CALL 'public open fun bar (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?>? declared in .B' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?>? origin=null + TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableList origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableList + CALL 'public open fun bar (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?>? declared in .B' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList? origin=null $this: GET_VAR 'b: .B declared in .test' type=.B origin=null VAR name:k23 type:java.util.Queue [val] - TYPE_OP type=java.util.Queue<@[FlexibleNullability] kotlin.String?> origin=IMPLICIT_NOTNULL typeOperand=java.util.Queue<@[FlexibleNullability] kotlin.String?> - CALL 'public open fun bar2 (): @[FlexibleNullability] java.util.Queue<@[FlexibleNullability] kotlin.String?>? declared in .B' type=@[FlexibleNullability] java.util.Queue<@[FlexibleNullability] kotlin.String?>? origin=null + TYPE_OP type=java.util.Queue origin=IMPLICIT_NOTNULL typeOperand=java.util.Queue + CALL 'public open fun bar2 (): @[FlexibleNullability] java.util.Queue<@[FlexibleNullability] kotlin.String?>? declared in .B' type=@[FlexibleNullability] java.util.Queue? origin=null $this: GET_VAR 'b: .B declared in .test' type=.B origin=null VAR name:k24 type:kotlin.collections.MutableSet [val] - TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] kotlin.String?> origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] kotlin.String?> - CALL 'public open fun bar3 (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] kotlin.String?>? declared in .B' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] kotlin.String?>? origin=null + TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableSet origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableSet + CALL 'public open fun bar3 (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableSet<@[FlexibleNullability] kotlin.String?>? declared in .B' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableSet? origin=null $this: GET_VAR 'b: .B declared in .test' type=.B origin=null CALL 'public open fun foo (a: @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?>?): kotlin.Unit declared in .B' type=kotlin.Unit origin=null $this: GET_VAR 'b: .B declared in .test' type=.B origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.kt.txt index c542aa3fb9c..00058dcf85c 100644 --- a/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.kt.txt +++ b/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.kt.txt @@ -90,15 +90,15 @@ fun test(a: A, b: B, c: C, d: D, e: E, f: F) { a.foo(a = k) a.foo2(b = k2) a.foo3(c = k3) - val k19: MutableList = b.#a /*!! @FlexibleMutability MutableList<@FlexibleNullability String?> */ - val k20: Queue = b.#b /*!! Queue<@FlexibleNullability String?> */ - val k21: MutableSet = b.#c /*!! @FlexibleMutability MutableSet<@FlexibleNullability String?> */ + val k19: MutableList = b.#a /*!! @FlexibleMutability MutableList */ + val k20: Queue = b.#b /*!! Queue */ + val k21: MutableSet = b.#c /*!! @FlexibleMutability MutableSet */ b.#a = mutableListOf() b.#b = LinkedList() b.#c = mutableSetOf() - val k22: MutableList = b.bar() /*!! @FlexibleMutability MutableList<@FlexibleNullability String?> */ - val k23: Queue = b.bar2() /*!! Queue<@FlexibleNullability String?> */ - val k24: MutableSet = b.bar3() /*!! @FlexibleMutability MutableSet<@FlexibleNullability String?> */ + val k22: MutableList = b.bar() /*!! @FlexibleMutability MutableList */ + val k23: Queue = b.bar2() /*!! Queue */ + val k24: MutableSet = b.bar3() /*!! @FlexibleMutability MutableSet */ b.foo(a = k19) b.foo2(b = k20) b.foo3(c = k21) diff --git a/compiler/testData/ir/irText/fakeOverrides/typenothing/substitutionOverrideOnNothing.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/typenothing/substitutionOverrideOnNothing.fir.ir.txt index df56a2f1829..adcb9d14f3a 100644 --- a/compiler/testData/ir/irText/fakeOverrides/typenothing/substitutionOverrideOnNothing.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/typenothing/substitutionOverrideOnNothing.fir.ir.txt @@ -74,10 +74,10 @@ FILE fqName: fileName:/1.kt $this: GET_VAR 'a: .A declared in .test' type=.A origin=null t: GET_VAR 'val k: kotlin.Nothing declared in .test' type=kotlin.Nothing origin=null VAR name:k4 type:kotlin.Nothing? [val] - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] T of .Java1? visibility:public' type=@[FlexibleNullability] kotlin.Nothing? origin=null + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] T of .Java1? visibility:public' type=kotlin.Nothing? origin=null receiver: GET_VAR 'b: .B declared in .test' type=.B origin=null VAR name:k5 type:kotlin.Nothing? [val] - CALL 'public open fun bar (): @[FlexibleNullability] kotlin.Nothing? declared in .B' type=@[FlexibleNullability] kotlin.Nothing? origin=null + CALL 'public open fun bar (): @[FlexibleNullability] kotlin.Nothing? declared in .B' type=kotlin.Nothing? origin=null $this: GET_VAR 'b: .B declared in .test' type=.B origin=null VAR name:k6 type:kotlin.Unit [val] CALL 'public open fun foo (t: @[FlexibleNullability] kotlin.Nothing?): kotlin.Unit declared in .B' type=kotlin.Unit origin=null