diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java index 9c42d967811..ea0eb35342c 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java @@ -540,6 +540,12 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI runTest("compiler/testData/ir/irText/declarations/kt52677.kt"); } + @Test + @TestMetadata("kt65432.kt") + public void testKt65432() throws Exception { + runTest("compiler/testData/ir/irText/declarations/kt65432.kt"); + } + @Test @TestMetadata("localClassWithOverrides.kt") public void testLocalClassWithOverrides() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java index 3982baab89e..549c3cc5e57 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java @@ -540,6 +540,12 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { runTest("compiler/testData/ir/irText/declarations/kt52677.kt"); } + @Test + @TestMetadata("kt65432.kt") + public void testKt65432() throws Exception { + runTest("compiler/testData/ir/irText/declarations/kt65432.kt"); + } + @Test @TestMetadata("localClassWithOverrides.kt") public void testLocalClassWithOverrides() throws Exception { diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/FirVisibilityChecker.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/FirVisibilityChecker.kt index 7e536169660..8d7ad3ee08c 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/FirVisibilityChecker.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/FirVisibilityChecker.kt @@ -163,6 +163,17 @@ abstract class FirVisibilityChecker : FirSessionComponent { derivedClassModuleData: FirModuleData, packageNameOfDerivedClass: FqName, candidateInBaseClass: FirMemberDeclaration, + ): Boolean = isSpecificDeclarationVisibleForOverriding( + derivedClassModuleData, + packageNameOfDerivedClass, + // It is important for package-private visiblity as fake override can be in another package + if (candidateInBaseClass is FirCallableDeclaration) candidateInBaseClass.originalOrSelf() else candidateInBaseClass, + ) + + private fun isSpecificDeclarationVisibleForOverriding( + derivedClassModuleData: FirModuleData, + packageNameOfDerivedClass: FqName, + candidateInBaseClass: FirMemberDeclaration, ): Boolean = when (candidateInBaseClass.visibility) { Visibilities.Internal -> { candidateInBaseClass.moduleData == derivedClassModuleData || diff --git a/compiler/testData/ir/irText/declarations/internalStdlibOverride.fir.ir.txt b/compiler/testData/ir/irText/declarations/internalStdlibOverride.fir.ir.txt index 1e29392d6ee..6428ed3b08e 100644 --- a/compiler/testData/ir/irText/declarations/internalStdlibOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/internalStdlibOverride.fir.ir.txt @@ -23,11 +23,11 @@ FILE fqName: fileName:/internalStdlibOverride.kt RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Set> declared in .MyMap' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:entries type:kotlin.collections.Set> visibility:private [final]' type=kotlin.collections.Set> origin=null receiver: GET_VAR ': .MyMap declared in .MyMap.' type=.MyMap origin=null - FUN name:containsEntry visibility:internal modality:FINAL <> ($this:.MyMap, entry:kotlin.collections.Map.Entry<*, *>?) returnType:kotlin.Boolean + FUN name:containsEntry visibility:public modality:FINAL <> ($this:.MyMap, entry:kotlin.collections.Map.Entry<*, *>?) returnType:kotlin.Boolean $this: VALUE_PARAMETER name: type:.MyMap VALUE_PARAMETER name:entry index:0 type:kotlin.collections.Map.Entry<*, *>? BLOCK_BODY - RETURN type=kotlin.Nothing from='internal final fun containsEntry (entry: kotlin.collections.Map.Entry<*, *>?): kotlin.Boolean declared in .MyMap' + RETURN type=kotlin.Nothing from='public final fun containsEntry (entry: kotlin.collections.Map.Entry<*, *>?): kotlin.Boolean declared in .MyMap' CONST Boolean type=kotlin.Boolean value=false FUN FAKE_OVERRIDE name:containsKey visibility:public modality:OPEN <> ($this:kotlin.collections.AbstractMap, key:kotlin.Int) returnType:kotlin.Boolean [fake_override] overridden: diff --git a/compiler/testData/ir/irText/declarations/internalStdlibOverride.fir.kt.txt b/compiler/testData/ir/irText/declarations/internalStdlibOverride.fir.kt.txt index ee712ca2e14..3d0c55dc414 100644 --- a/compiler/testData/ir/irText/declarations/internalStdlibOverride.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/internalStdlibOverride.fir.kt.txt @@ -9,7 +9,7 @@ class MyMap : AbstractMap { field = emptySet>() override get - internal fun containsEntry(entry: Entry<*, *>?): Boolean { + fun containsEntry(entry: Entry<*, *>?): Boolean { return false } diff --git a/compiler/testData/ir/irText/declarations/internalStdlibOverride.kt b/compiler/testData/ir/irText/declarations/internalStdlibOverride.kt index a9f4ac94930..9adace5b61e 100644 --- a/compiler/testData/ir/irText/declarations/internalStdlibOverride.kt +++ b/compiler/testData/ir/irText/declarations/internalStdlibOverride.kt @@ -1,7 +1,6 @@ // WITH_STDLIB // ENABLE_IR_FAKE_OVERRIDE_GENERATION // KT-64692 -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR // test data differs - no getOrDefault in AbstractMap for non-jvm. // IGNORE_BACKEND: NATIVE, JS, JS_IR, JS_IR_ES6, WASM diff --git a/compiler/testData/ir/irText/declarations/kt65432.fir.ir.txt b/compiler/testData/ir/irText/declarations/kt65432.fir.ir.txt new file mode 100644 index 00000000000..fe52e2a6fb7 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/kt65432.fir.ir.txt @@ -0,0 +1,314 @@ +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]' + PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open size: kotlin.Int + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.Java1) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:.Java1 + FUN FAKE_OVERRIDE name:trimToSize visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun trimToSize (): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:ensureCapacity visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + public open fun ensureCapacity (p0: kotlin.Int): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun isEmpty (): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun contains (p0: @[EnhancedNullability] kotlin.Int): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Int [fake_override] + overridden: + public open fun indexOf (p0: @[EnhancedNullability] kotlin.Int): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Int [fake_override] + overridden: + public open fun lastIndexOf (p0: @[EnhancedNullability] kotlin.Int): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:clone visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + overridden: + public open fun clone (): @[EnhancedNullability] kotlin.Any declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) 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.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array.A.toArray?>?) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array.A.toArray?>? [fake_override] + overridden: + public open fun toArray (p0: @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array.Java1.toArray?>?): @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array.Java1.toArray?>? declared in .Java1 + TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array.A.toArray?>? + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override,operator] + overridden: + public open fun get (p0: kotlin.Int): @[EnhancedNullability] kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override,operator] + overridden: + public open fun set (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.Int): @[EnhancedNullability] kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun add (p0: @[EnhancedNullability] kotlin.Int): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + public open fun add (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.Int): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun remove (p0: @[EnhancedNullability] kotlin.Int): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun clear (): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection + FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun removeAll (p0: kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun retainAll (p0: kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] kotlin.Int> [fake_override,operator] + overridden: + public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] kotlin.Int> declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[EnhancedNullability] kotlin.Int> declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?>, p0:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (p0: kotlin.Any?): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?> + VALUE_PARAMETER name:p0 index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?>) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?> + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?>, p0:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsAll (p0: kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?> + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?>) returnType:@[EnhancedNullability] kotlin.String [fake_override] + overridden: + public open fun toString (): @[EnhancedNullability] kotlin.String declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?> + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override,operator] + overridden: + public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + CLASS CLASS name:KotlinClass modality:OPEN visibility:public superTypes:[java.util.ArrayList] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.KotlinClass + CONSTRUCTOR visibility:public <> () returnType:.KotlinClass [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in java.util.ArrayList' + : kotlin.Int + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:KotlinClass modality:OPEN visibility:public superTypes:[java.util.ArrayList]' + PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open size: kotlin.Int + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.Int declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:trimToSize visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun trimToSize (): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:ensureCapacity visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + public open fun ensureCapacity (p0: kotlin.Int): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun isEmpty (): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun contains (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Int [fake_override] + overridden: + public open fun indexOf (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Int [fake_override] + overridden: + public open fun lastIndexOf (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:clone visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + overridden: + public open fun clone (): @[EnhancedNullability] kotlin.Any declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? [fake_override] + overridden: + public open fun toArray (): @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array.KotlinClass.toArray?>?) returnType:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array.KotlinClass.toArray?>? [fake_override] + overridden: + public open fun toArray (p0: @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array?): @[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array? declared in java.util.ArrayList + TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] @[FlexibleArrayElementVariance] kotlin.Array.KotlinClass.toArray?>? + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Int [fake_override,operator] + overridden: + public open fun get (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Int [fake_override,operator] + overridden: + public open fun set (p0: kotlin.Int, p1: @[EnhancedNullability] E of java.util.ArrayList): @[EnhancedNullability] E of java.util.ArrayList declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun add (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + public open fun add (p0: kotlin.Int, p1: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun remove (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun clear (): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection + FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun removeAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun retainAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator [fake_override] + overridden: + public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator [fake_override] + overridden: + public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator [fake_override,operator] + overridden: + public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList [fake_override] + overridden: + public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?>, p0:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (p0: kotlin.Any?): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?> + VALUE_PARAMETER name:p0 index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?>) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?> + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?>, p0:kotlin.collections.Collection) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?> + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?>) returnType:@[EnhancedNullability] kotlin.String [fake_override] + overridden: + public open fun toString (): @[EnhancedNullability] kotlin.String declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?> + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Int [fake_override,operator] + overridden: + public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int diff --git a/compiler/testData/ir/irText/declarations/kt65432.fir.kt.txt b/compiler/testData/ir/irText/declarations/kt65432.fir.kt.txt new file mode 100644 index 00000000000..70e1913688f --- /dev/null +++ b/compiler/testData/ir/irText/declarations/kt65432.fir.kt.txt @@ -0,0 +1,17 @@ +class A : Java1 { + constructor() /* primary */ { + super/*Java1*/() + /* () */ + + } + +} + +open class KotlinClass : ArrayList { + constructor() /* primary */ { + super/*ArrayList*/() + /* () */ + + } + +} diff --git a/compiler/testData/ir/irText/declarations/kt65432.fir.sig.kt.txt b/compiler/testData/ir/irText/declarations/kt65432.fir.sig.kt.txt new file mode 100644 index 00000000000..43b12a03715 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/kt65432.fir.sig.kt.txt @@ -0,0 +1,393 @@ +// CHECK: +// Mangled name: A +// Public signature: /A|null[0] +class A : Java1 { + // CHECK: + // Mangled name: A#(){} + // Public signature: /A.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + + // CHECK JVM_IR: + // Mangled name: A#add(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.add|7559962077055454748[0] + // Public signature debug description: add(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun add(p0: @EnhancedNullability Int): Boolean + + // CHECK: + // Mangled name: A#add(kotlin.Int;kotlin.Int{EnhancedNullability}){} + // Public signature: /A.add|-3194712170900556378[0] + // Public signature debug description: add(kotlin.Int;kotlin.Int{EnhancedNullability}){} + /* fake */ override fun add(p0: Int, p1: @EnhancedNullability Int): Unit + + // CHECK JVM_IR: + // Mangled name: A#addAll(kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.addAll|-8388196230555083661[0] + // Public signature debug description: addAll(kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun addAll(p0: @EnhancedNullability Collection): Boolean + + // CHECK JVM_IR: + // Mangled name: A#addAll(kotlin.Int;kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.addAll|30670022050259765[0] + // Public signature debug description: addAll(kotlin.Int;kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun addAll(p0: Int, p1: @EnhancedNullability Collection): Boolean + + // CHECK: + // Mangled name: A#clear(){} + // Public signature: /A.clear|-6446868449915108923[0] + // Public signature debug description: clear(){} + /* fake */ override fun clear(): Unit + + // CHECK JVM_IR: + // Mangled name: A#clone(){}kotlin.Any{EnhancedNullability} + // Public signature: /A.clone|178802004086941196[0] + // Public signature debug description: clone(){}kotlin.Any{EnhancedNullability} + /* fake */ override fun clone(): @EnhancedNullability Any + + // CHECK JVM_IR: + // Mangled name: A#contains(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.contains|3736388240191289860[0] + // Public signature debug description: contains(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override operator fun contains(p0: @EnhancedNullability Int): Boolean + + // CHECK JVM_IR: + // Mangled name: A#containsAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /A.containsAll|-6765067201579764726[0] + // Public signature debug description: containsAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun containsAll(p0: Collection<@EnhancedNullability Int>): Boolean + + // CHECK: + // Mangled name: A#ensureCapacity(kotlin.Int){} + // Public signature: /A.ensureCapacity|-7913402150632352615[0] + // Public signature debug description: ensureCapacity(kotlin.Int){} + /* fake */ override fun ensureCapacity(p0: Int): Unit + + // CHECK JVM_IR: + // Mangled name: A#equals(kotlin.Any?){}kotlin.Boolean + // Public signature: /A.equals|722809408929142791[0] + // Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean + /* fake */ override operator fun equals(p0: Any?): Boolean + + // CHECK JVM_IR: + // Mangled name: A#get(kotlin.Int){}kotlin.Int{EnhancedNullability} + // Public signature: /A.get|-8822924217357855534[0] + // Public signature debug description: get(kotlin.Int){}kotlin.Int{EnhancedNullability} + /* fake */ override operator fun get(p0: Int): @EnhancedNullability Int + + // CHECK JVM_IR: + // Mangled name: A#hashCode(){}kotlin.Int + // Public signature: /A.hashCode|-8048879360829830756[0] + // Public signature debug description: hashCode(){}kotlin.Int + /* fake */ override fun hashCode(): Int + + // CHECK JVM_IR: + // Mangled name: A#indexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + // Public signature: /A.indexOf|866974352596659798[0] + // Public signature debug description: indexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + /* fake */ override fun indexOf(p0: @EnhancedNullability Int): Int + + // CHECK JVM_IR: + // Mangled name: A#isEmpty(){}kotlin.Boolean + // Public signature: /A.isEmpty|-626562167393617703[0] + // Public signature debug description: isEmpty(){}kotlin.Boolean + /* fake */ override fun isEmpty(): Boolean + + // CHECK JVM_IR: + // Mangled name: A#iterator(){}kotlin.collections.MutableIterator{EnhancedNullability} + // Public signature: /A.iterator|115627760567581658[0] + // Public signature debug description: iterator(){}kotlin.collections.MutableIterator{EnhancedNullability} + /* fake */ override operator fun iterator(): @EnhancedNullability MutableIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: A#lastIndexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + // Public signature: /A.lastIndexOf|1115527748420890033[0] + // Public signature debug description: lastIndexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + /* fake */ override fun lastIndexOf(p0: @EnhancedNullability Int): Int + + // CHECK JVM_IR: + // Mangled name: A#listIterator(){}kotlin.collections.MutableListIterator{EnhancedNullability} + // Public signature: /A.listIterator|4960815808465755041[0] + // Public signature debug description: listIterator(){}kotlin.collections.MutableListIterator{EnhancedNullability} + /* fake */ override fun listIterator(): @EnhancedNullability MutableListIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: A#listIterator(kotlin.Int){}kotlin.collections.MutableListIterator{EnhancedNullability} + // Public signature: /A.listIterator|-2268028930611070307[0] + // Public signature debug description: listIterator(kotlin.Int){}kotlin.collections.MutableListIterator{EnhancedNullability} + /* fake */ override fun listIterator(p0: Int): @EnhancedNullability MutableListIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: A#remove(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.remove|2933193249427016334[0] + // Public signature debug description: remove(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun remove(p0: @EnhancedNullability Int): Boolean + + // CHECK JVM_IR: + // Mangled name: A#removeAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /A.removeAll|-5493620261823900507[0] + // Public signature debug description: removeAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun removeAll(p0: Collection<@EnhancedNullability Int>): Boolean + + // CHECK JVM_IR: + // Mangled name: A#removeAt(kotlin.Int){}kotlin.Int{EnhancedNullability} + // Public signature: /A.removeAt|6480490686215931144[0] + // Public signature debug description: removeAt(kotlin.Int){}kotlin.Int{EnhancedNullability} + /* fake */ override operator fun removeAt(p0: Int): @EnhancedNullability Int + + // CHECK: + // Mangled name: A#removeRange(kotlin.Int;kotlin.Int){} + // Public signature: /A.removeRange|7632320944993890593[0] + // Public signature debug description: removeRange(kotlin.Int;kotlin.Int){} + protected_and_package /* fake */ override fun removeRange(p0: Int, p1: Int): Unit + + // CHECK JVM_IR: + // Mangled name: A#retainAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /A.retainAll|-3550913358824719637[0] + // Public signature debug description: retainAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun retainAll(p0: Collection<@EnhancedNullability Int>): Boolean + + // CHECK JVM_IR: + // Mangled name: A#set(kotlin.Int;kotlin.Int{EnhancedNullability}){}kotlin.Int{EnhancedNullability} + // Public signature: /A.set|-7932912415931410975[0] + // Public signature debug description: set(kotlin.Int;kotlin.Int{EnhancedNullability}){}kotlin.Int{EnhancedNullability} + /* fake */ override operator fun set(p0: Int, p1: @EnhancedNullability Int): @EnhancedNullability Int + + // CHECK JVM_IR: + // Mangled name: A#subList(kotlin.Int;kotlin.Int){}kotlin.collections.MutableList{EnhancedNullability} + // Public signature: /A.subList|127837164145565172[0] + // Public signature debug description: subList(kotlin.Int;kotlin.Int){}kotlin.collections.MutableList{EnhancedNullability} + /* fake */ override fun subList(p0: Int, p1: Int): @EnhancedNullability MutableList<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: A#toArray(){}kotlin.Array? + // Public signature: /A.toArray|-8468800257910341540[0] + // Public signature debug description: toArray(){}kotlin.Array? + /* fake */ override fun toArray(): Array? + + // CHECK JVM_IR: + // Mangled name: A#toArray(kotlin.Array?){0§}kotlin.Array? + // Public signature: /A.toArray|-7248906015406159030[0] + // Public signature debug description: toArray(kotlin.Array?){0§}kotlin.Array? + /* fake */ override fun toArray(p0: Array?): Array? + + // CHECK JVM_IR: + // Mangled name: A#toString(){}kotlin.String{EnhancedNullability} + // Public signature: /A.toString|7581629773206850948[0] + // Public signature debug description: toString(){}kotlin.String{EnhancedNullability} + /* fake */ override fun toString(): @EnhancedNullability String + + // CHECK: + // Mangled name: A#trimToSize(){} + // Public signature: /A.trimToSize|-5937642362792008740[0] + // Public signature debug description: trimToSize(){} + /* fake */ override fun trimToSize(): Unit + + // CHECK: + // Mangled name: A{}size + // Public signature: /A.size|-6253659984320132064[0] + // Public signature debug description: {}size + /* fake */ override val size: Int + // CHECK JVM_IR: + // Mangled name: A#(){}kotlin.Int + // Public signature: /A.size.|-3941649985161900780[0] + // Public signature debug description: (){}kotlin.Int + /* fake */ override get(): Int + +} + +// CHECK: +// Mangled name: KotlinClass +// Public signature: /KotlinClass|null[0] +open class KotlinClass : ArrayList { + // CHECK: + // Mangled name: KotlinClass#(){} + // Public signature: /KotlinClass.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + + // CHECK JVM_IR: + // Mangled name: KotlinClass#add(kotlin.Int){}kotlin.Boolean + // Public signature: /KotlinClass.add|-1806173376318726841[0] + // Public signature debug description: add(kotlin.Int){}kotlin.Boolean + /* fake */ override fun add(p0: Int): Boolean + + // CHECK: + // Mangled name: KotlinClass#add(kotlin.Int;kotlin.Int){} + // Public signature: /KotlinClass.add|-6416567052772437491[0] + // Public signature debug description: add(kotlin.Int;kotlin.Int){} + /* fake */ override fun add(p0: Int, p1: Int): Unit + + // CHECK JVM_IR: + // Mangled name: KotlinClass#addAll(kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + // Public signature: /KotlinClass.addAll|-2033819616667572066[0] + // Public signature debug description: addAll(kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun addAll(p0: @EnhancedNullability Collection): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#addAll(kotlin.Int;kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + // Public signature: /KotlinClass.addAll|7567819331579950214[0] + // Public signature debug description: addAll(kotlin.Int;kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun addAll(p0: Int, p1: @EnhancedNullability Collection): Boolean + + // CHECK: + // Mangled name: KotlinClass#clear(){} + // Public signature: /KotlinClass.clear|-6446868449915108923[0] + // Public signature debug description: clear(){} + /* fake */ override fun clear(): Unit + + // CHECK JVM_IR: + // Mangled name: KotlinClass#clone(){}kotlin.Any{EnhancedNullability} + // Public signature: /KotlinClass.clone|178802004086941196[0] + // Public signature debug description: clone(){}kotlin.Any{EnhancedNullability} + /* fake */ override fun clone(): @EnhancedNullability Any + + // CHECK JVM_IR: + // Mangled name: KotlinClass#contains(kotlin.Int){}kotlin.Boolean + // Public signature: /KotlinClass.contains|5978686608528191145[0] + // Public signature debug description: contains(kotlin.Int){}kotlin.Boolean + /* fake */ override operator fun contains(p0: Int): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#containsAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /KotlinClass.containsAll|5891935227751154106[0] + // Public signature debug description: containsAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun containsAll(p0: Collection): Boolean + + // CHECK: + // Mangled name: KotlinClass#ensureCapacity(kotlin.Int){} + // Public signature: /KotlinClass.ensureCapacity|-7913402150632352615[0] + // Public signature debug description: ensureCapacity(kotlin.Int){} + /* fake */ override fun ensureCapacity(p0: Int): Unit + + // CHECK JVM_IR: + // Mangled name: KotlinClass#equals(kotlin.Any?){}kotlin.Boolean + // Public signature: /KotlinClass.equals|722809408929142791[0] + // Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean + /* fake */ override operator fun equals(p0: Any?): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#get(kotlin.Int){}kotlin.Int + // Public signature: /KotlinClass.get|3217555545696752959[0] + // Public signature debug description: get(kotlin.Int){}kotlin.Int + /* fake */ override operator fun get(p0: Int): Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#hashCode(){}kotlin.Int + // Public signature: /KotlinClass.hashCode|-8048879360829830756[0] + // Public signature debug description: hashCode(){}kotlin.Int + /* fake */ override fun hashCode(): Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#indexOf(kotlin.Int){}kotlin.Int + // Public signature: /KotlinClass.indexOf|5710916612120162838[0] + // Public signature debug description: indexOf(kotlin.Int){}kotlin.Int + /* fake */ override fun indexOf(p0: Int): Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#isEmpty(){}kotlin.Boolean + // Public signature: /KotlinClass.isEmpty|-626562167393617703[0] + // Public signature debug description: isEmpty(){}kotlin.Boolean + /* fake */ override fun isEmpty(): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#iterator(){}kotlin.collections.MutableIterator{EnhancedNullability} + // Public signature: /KotlinClass.iterator|-5915142189962474933[0] + // Public signature debug description: iterator(){}kotlin.collections.MutableIterator{EnhancedNullability} + /* fake */ override operator fun iterator(): @EnhancedNullability MutableIterator + + // CHECK JVM_IR: + // Mangled name: KotlinClass#lastIndexOf(kotlin.Int){}kotlin.Int + // Public signature: /KotlinClass.lastIndexOf|-172555725694166910[0] + // Public signature debug description: lastIndexOf(kotlin.Int){}kotlin.Int + /* fake */ override fun lastIndexOf(p0: Int): Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#listIterator(){}kotlin.collections.MutableListIterator{EnhancedNullability} + // Public signature: /KotlinClass.listIterator|-3740700113407466328[0] + // Public signature debug description: listIterator(){}kotlin.collections.MutableListIterator{EnhancedNullability} + /* fake */ override fun listIterator(): @EnhancedNullability MutableListIterator + + // CHECK JVM_IR: + // Mangled name: KotlinClass#listIterator(kotlin.Int){}kotlin.collections.MutableListIterator{EnhancedNullability} + // Public signature: /KotlinClass.listIterator|2313954087549974075[0] + // Public signature debug description: listIterator(kotlin.Int){}kotlin.collections.MutableListIterator{EnhancedNullability} + /* fake */ override fun listIterator(p0: Int): @EnhancedNullability MutableListIterator + + // CHECK JVM_IR: + // Mangled name: KotlinClass#remove(kotlin.Int){}kotlin.Boolean + // Public signature: /KotlinClass.remove|-2631909738569200722[0] + // Public signature debug description: remove(kotlin.Int){}kotlin.Boolean + /* fake */ override fun remove(p0: Int): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#removeAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /KotlinClass.removeAll|-3862070029132854703[0] + // Public signature debug description: removeAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun removeAll(p0: Collection): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#removeAt(kotlin.Int){}kotlin.Int + // Public signature: /KotlinClass.removeAt|1718425690973201805[0] + // Public signature debug description: removeAt(kotlin.Int){}kotlin.Int + /* fake */ override operator fun removeAt(p0: Int): Int + + // CHECK: + // Mangled name: KotlinClass#removeRange(kotlin.Int;kotlin.Int){} + // Public signature: /KotlinClass.removeRange|7632320944993890593[0] + // Public signature debug description: removeRange(kotlin.Int;kotlin.Int){} + protected_and_package /* fake */ override fun removeRange(p0: Int, p1: Int): Unit + + // CHECK JVM_IR: + // Mangled name: KotlinClass#retainAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /KotlinClass.retainAll|1291083757121901219[0] + // Public signature debug description: retainAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun retainAll(p0: Collection): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#set(kotlin.Int;kotlin.Int){}kotlin.Int + // Public signature: /KotlinClass.set|2686031312585099809[0] + // Public signature debug description: set(kotlin.Int;kotlin.Int){}kotlin.Int + /* fake */ override operator fun set(p0: Int, p1: Int): Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#subList(kotlin.Int;kotlin.Int){}kotlin.collections.MutableList{EnhancedNullability} + // Public signature: /KotlinClass.subList|-7245971573298952132[0] + // Public signature debug description: subList(kotlin.Int;kotlin.Int){}kotlin.collections.MutableList{EnhancedNullability} + /* fake */ override fun subList(p0: Int, p1: Int): @EnhancedNullability MutableList + + // CHECK JVM_IR: + // Mangled name: KotlinClass#toArray(){}kotlin.Array? + // Public signature: /KotlinClass.toArray|-8468800257910341540[0] + // Public signature debug description: toArray(){}kotlin.Array? + /* fake */ override fun toArray(): Array? + + // CHECK JVM_IR: + // Mangled name: KotlinClass#toArray(kotlin.Array?){0§}kotlin.Array? + // Public signature: /KotlinClass.toArray|-7248906015406159030[0] + // Public signature debug description: toArray(kotlin.Array?){0§}kotlin.Array? + /* fake */ override fun toArray(p0: Array?): Array? + + // CHECK JVM_IR: + // Mangled name: KotlinClass#toString(){}kotlin.String{EnhancedNullability} + // Public signature: /KotlinClass.toString|7581629773206850948[0] + // Public signature debug description: toString(){}kotlin.String{EnhancedNullability} + /* fake */ override fun toString(): @EnhancedNullability String + + // CHECK: + // Mangled name: KotlinClass#trimToSize(){} + // Public signature: /KotlinClass.trimToSize|-5937642362792008740[0] + // Public signature debug description: trimToSize(){} + /* fake */ override fun trimToSize(): Unit + + // CHECK: + // Mangled name: KotlinClass{}size + // Public signature: /KotlinClass.size|-6253659984320132064[0] + // Public signature debug description: {}size + /* fake */ override val size: Int + // CHECK JVM_IR: + // Mangled name: KotlinClass#(){}kotlin.Int + // Public signature: /KotlinClass.size.|-3941649985161900780[0] + // Public signature debug description: (){}kotlin.Int + /* fake */ override get(): Int + +} diff --git a/compiler/testData/ir/irText/declarations/kt65432.ir.txt b/compiler/testData/ir/irText/declarations/kt65432.ir.txt new file mode 100644 index 00000000000..4349cfdf4c6 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/kt65432.ir.txt @@ -0,0 +1,320 @@ +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:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun add (element: @[EnhancedNullability] kotlin.Int): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + public open fun add (index: kotlin.Int, element: @[EnhancedNullability] kotlin.Int): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + VALUE_PARAMETER name:element index:1 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:@[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (elements: @[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:elements index:0 type:@[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int, elements:@[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (index: kotlin.Int, elements: @[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + VALUE_PARAMETER name:elements index:1 type:@[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun clear (): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] kotlin.Int> [fake_override,operator] + overridden: + public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] kotlin.Int> declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun remove (element: @[EnhancedNullability] kotlin.Int): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun removeAll (elements: kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun retainAll (elements: kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun contains (element: @[EnhancedNullability] kotlin.Int): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?>, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsAll (elements: kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?> + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun isEmpty (): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?>, other:@[EnhancedNullability] kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: @[EnhancedNullability] kotlin.Any?): kotlin.Boolean declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?> + VALUE_PARAMETER name:other index:0 type:@[EnhancedNullability] kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?>) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?> + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?>) returnType:@[EnhancedNullability] kotlin.String [fake_override] + overridden: + public open fun toString (): @[EnhancedNullability] kotlin.String declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?> + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] + overridden: + public open fun toArray (): @[FlexibleNullability] kotlin.Array? declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.Array.A.toArray?>?) returnType:@[FlexibleNullability] kotlin.Array.A.toArray?>? [fake_override] + overridden: + public open fun toArray (p0: @[FlexibleNullability] kotlin.Array.Java1.toArray?>?): @[FlexibleNullability] kotlin.Array.Java1.toArray?>? declared in .Java1 + TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.A.toArray?>? + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun listIterator (index: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override] + overridden: + public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int, element:@[EnhancedNullability] kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override,operator] + overridden: + public open fun set (index: kotlin.Int, element: @[EnhancedNullability] kotlin.Int): @[EnhancedNullability] kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + VALUE_PARAMETER name:element index:1 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, fromIndex:kotlin.Int, toIndex:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun subList (fromIndex: kotlin.Int, toIndex: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[EnhancedNullability] kotlin.Int> declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:fromIndex index:0 type:kotlin.Int + VALUE_PARAMETER name:toIndex index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override,operator] + overridden: + public open fun get (index: kotlin.Int): @[EnhancedNullability] kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Int [fake_override] + overridden: + public open fun indexOf (element: @[EnhancedNullability] kotlin.Int): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Int [fake_override] + overridden: + public open fun lastIndexOf (element: @[EnhancedNullability] kotlin.Int): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:clone visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + overridden: + public open fun clone (): @[EnhancedNullability] kotlin.Any declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:trimToSize visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun trimToSize (): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:ensureCapacity visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + public open fun ensureCapacity (p0: kotlin.Int): kotlin.Unit declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open size: kotlin.Int + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:java.util.ArrayList + PROPERTY FAKE_OVERRIDE name:modCount visibility:protected/*protected and package*/ modality:FINAL [fake_override,var] + overridden: + protected/*protected and package*/ final modCount: kotlin.Int + CLASS CLASS name:KotlinClass modality:OPEN visibility:public superTypes:[java.util.ArrayList] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.KotlinClass + CONSTRUCTOR visibility:public <> () returnType:.KotlinClass [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in java.util.ArrayList' + : @[FlexibleNullability] kotlin.Int? + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:KotlinClass modality:OPEN visibility:public superTypes:[java.util.ArrayList]' + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun add (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + public open fun add (index: kotlin.Int, element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + VALUE_PARAMETER name:element index:1 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:@[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (elements: @[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:elements index:0 type:@[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int, elements:@[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (index: kotlin.Int, elements: @[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + VALUE_PARAMETER name:elements index:1 type:@[EnhancedNullability] kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun clear (): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] kotlin.Int> [fake_override,operator] + overridden: + public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun remove (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun removeAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun retainAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun contains (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?>, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?> + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.Int> + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun isEmpty (): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?>, other:@[EnhancedNullability] kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: @[EnhancedNullability] kotlin.Any?): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?> + VALUE_PARAMETER name:other index:0 type:@[EnhancedNullability] kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?>) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.AbstractList<@[FlexibleNullability] kotlin.Int?> + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?>) returnType:@[EnhancedNullability] kotlin.String [fake_override] + overridden: + public open fun toString (): @[EnhancedNullability] kotlin.String declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.Int?> + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] + overridden: + public open fun toArray (): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.Array.KotlinClass.toArray?>?) returnType:@[FlexibleNullability] kotlin.Array.KotlinClass.toArray?>? [fake_override] + overridden: + public open fun toArray (p0: @[FlexibleNullability] kotlin.Array?): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList + TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.KotlinClass.toArray?>? + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun listIterator (index: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override] + overridden: + public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int, element:@[EnhancedNullability] kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override,operator] + overridden: + public open fun set (index: kotlin.Int, element: @[EnhancedNullability] E of java.util.ArrayList): @[EnhancedNullability] E of java.util.ArrayList declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + VALUE_PARAMETER name:element index:1 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, fromIndex:kotlin.Int, toIndex:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<@[EnhancedNullability] kotlin.Int> [fake_override] + overridden: + public open fun subList (fromIndex: kotlin.Int, toIndex: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:fromIndex index:0 type:kotlin.Int + VALUE_PARAMETER name:toIndex index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, index:kotlin.Int) returnType:@[EnhancedNullability] kotlin.Int [fake_override,operator] + overridden: + public open fun get (index: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:index index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Int [fake_override] + overridden: + public open fun indexOf (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.Int) returnType:kotlin.Int [fake_override] + overridden: + public open fun lastIndexOf (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.Int + FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:clone visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + overridden: + public open fun clone (): @[EnhancedNullability] kotlin.Any declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:trimToSize visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun trimToSize (): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:ensureCapacity visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:kotlin.Unit [fake_override] + overridden: + public open fun ensureCapacity (p0: kotlin.Int): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open size: kotlin.Int + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.Int declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + PROPERTY FAKE_OVERRIDE name:modCount visibility:protected/*protected and package*/ modality:FINAL [fake_override,var] + overridden: + protected/*protected and package*/ final modCount: kotlin.Int diff --git a/compiler/testData/ir/irText/declarations/kt65432.kt b/compiler/testData/ir/irText/declarations/kt65432.kt new file mode 100644 index 00000000000..bfdf8e2cd79 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/kt65432.kt @@ -0,0 +1,17 @@ +// WITH_STDLIB +// ENABLE_IR_FAKE_OVERRIDE_GENERATION +// SEPARATE_SIGNATURE_DUMP_FOR_K2 +// ^ Value parameters in fake overrides generated by K1 and K2 are different + +// WITH_REFLECT +// TARGET_BACKEND: JVM_IR + +// FILE: Java1.java +public class Java1 extends KotlinClass { } + +// FILE: 1.kt +import java.util.ArrayList + +class A : Java1() + +open class KotlinClass : ArrayList() \ No newline at end of file diff --git a/compiler/testData/ir/irText/declarations/kt65432.kt.txt b/compiler/testData/ir/irText/declarations/kt65432.kt.txt new file mode 100644 index 00000000000..2b883fe5692 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/kt65432.kt.txt @@ -0,0 +1,17 @@ +class A : Java1 { + constructor() /* primary */ { + super/*Java1*/() + /* () */ + + } + +} + +open class KotlinClass : ArrayList { + constructor() /* primary */ { + super/*ArrayList*/<@FlexibleNullability Int?>() + /* () */ + + } + +} diff --git a/compiler/testData/ir/irText/declarations/kt65432.sig.kt.txt b/compiler/testData/ir/irText/declarations/kt65432.sig.kt.txt new file mode 100644 index 00000000000..dc84c8dd30c --- /dev/null +++ b/compiler/testData/ir/irText/declarations/kt65432.sig.kt.txt @@ -0,0 +1,393 @@ +// CHECK: +// Mangled name: A +// Public signature: /A|null[0] +class A : Java1 { + // CHECK: + // Mangled name: A#(){} + // Public signature: /A.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + + // CHECK JVM_IR: + // Mangled name: A#add(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.add|7559962077055454748[0] + // Public signature debug description: add(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun add(element: @EnhancedNullability Int): Boolean + + // CHECK: + // Mangled name: A#add(kotlin.Int;kotlin.Int{EnhancedNullability}){} + // Public signature: /A.add|-3194712170900556378[0] + // Public signature debug description: add(kotlin.Int;kotlin.Int{EnhancedNullability}){} + /* fake */ override fun add(index: Int, element: @EnhancedNullability Int): Unit + + // CHECK JVM_IR: + // Mangled name: A#addAll(kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.addAll|-8818439124580844723[0] + // Public signature debug description: addAll(kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun addAll(elements: @EnhancedNullability Collection<@EnhancedNullability Int>): Boolean + + // CHECK JVM_IR: + // Mangled name: A#addAll(kotlin.Int;kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.addAll|357368019962742687[0] + // Public signature debug description: addAll(kotlin.Int;kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun addAll(index: Int, elements: @EnhancedNullability Collection<@EnhancedNullability Int>): Boolean + + // CHECK: + // Mangled name: A#clear(){} + // Public signature: /A.clear|-6446868449915108923[0] + // Public signature debug description: clear(){} + /* fake */ override fun clear(): Unit + + // CHECK JVM_IR: + // Mangled name: A#clone(){}kotlin.Any{EnhancedNullability} + // Public signature: /A.clone|178802004086941196[0] + // Public signature debug description: clone(){}kotlin.Any{EnhancedNullability} + /* fake */ override fun clone(): @EnhancedNullability Any + + // CHECK JVM_IR: + // Mangled name: A#contains(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.contains|3736388240191289860[0] + // Public signature debug description: contains(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override operator fun contains(element: @EnhancedNullability Int): Boolean + + // CHECK JVM_IR: + // Mangled name: A#containsAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /A.containsAll|-6765067201579764726[0] + // Public signature debug description: containsAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun containsAll(elements: Collection<@EnhancedNullability Int>): Boolean + + // CHECK: + // Mangled name: A#ensureCapacity(kotlin.Int){} + // Public signature: /A.ensureCapacity|-7913402150632352615[0] + // Public signature debug description: ensureCapacity(kotlin.Int){} + /* fake */ override fun ensureCapacity(p0: Int): Unit + + // CHECK JVM_IR: + // Mangled name: A#equals(kotlin.Any?{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.equals|4126616015386471185[0] + // Public signature debug description: equals(kotlin.Any?{EnhancedNullability}){}kotlin.Boolean + /* fake */ override operator fun equals(other: @EnhancedNullability Any?): Boolean + + // CHECK JVM_IR: + // Mangled name: A#get(kotlin.Int){}kotlin.Int{EnhancedNullability} + // Public signature: /A.get|-8822924217357855534[0] + // Public signature debug description: get(kotlin.Int){}kotlin.Int{EnhancedNullability} + /* fake */ override operator fun get(index: Int): @EnhancedNullability Int + + // CHECK JVM_IR: + // Mangled name: A#hashCode(){}kotlin.Int + // Public signature: /A.hashCode|-8048879360829830756[0] + // Public signature debug description: hashCode(){}kotlin.Int + /* fake */ override fun hashCode(): Int + + // CHECK JVM_IR: + // Mangled name: A#indexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + // Public signature: /A.indexOf|866974352596659798[0] + // Public signature debug description: indexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + /* fake */ override fun indexOf(element: @EnhancedNullability Int): Int + + // CHECK JVM_IR: + // Mangled name: A#isEmpty(){}kotlin.Boolean + // Public signature: /A.isEmpty|-626562167393617703[0] + // Public signature debug description: isEmpty(){}kotlin.Boolean + /* fake */ override fun isEmpty(): Boolean + + // CHECK JVM_IR: + // Mangled name: A#iterator(){}kotlin.collections.MutableIterator{EnhancedNullability} + // Public signature: /A.iterator|115627760567581658[0] + // Public signature debug description: iterator(){}kotlin.collections.MutableIterator{EnhancedNullability} + /* fake */ override operator fun iterator(): @EnhancedNullability MutableIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: A#lastIndexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + // Public signature: /A.lastIndexOf|1115527748420890033[0] + // Public signature debug description: lastIndexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + /* fake */ override fun lastIndexOf(element: @EnhancedNullability Int): Int + + // CHECK JVM_IR: + // Mangled name: A#listIterator(){}kotlin.collections.MutableListIterator{EnhancedNullability} + // Public signature: /A.listIterator|4960815808465755041[0] + // Public signature debug description: listIterator(){}kotlin.collections.MutableListIterator{EnhancedNullability} + /* fake */ override fun listIterator(): @EnhancedNullability MutableListIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: A#listIterator(kotlin.Int){}kotlin.collections.MutableListIterator{EnhancedNullability} + // Public signature: /A.listIterator|-2268028930611070307[0] + // Public signature debug description: listIterator(kotlin.Int){}kotlin.collections.MutableListIterator{EnhancedNullability} + /* fake */ override fun listIterator(index: Int): @EnhancedNullability MutableListIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: A#remove(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /A.remove|2933193249427016334[0] + // Public signature debug description: remove(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun remove(element: @EnhancedNullability Int): Boolean + + // CHECK JVM_IR: + // Mangled name: A#removeAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /A.removeAll|-5493620261823900507[0] + // Public signature debug description: removeAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun removeAll(elements: Collection<@EnhancedNullability Int>): Boolean + + // CHECK JVM_IR: + // Mangled name: A#removeAt(kotlin.Int){}kotlin.Int{EnhancedNullability} + // Public signature: /A.removeAt|6480490686215931144[0] + // Public signature debug description: removeAt(kotlin.Int){}kotlin.Int{EnhancedNullability} + /* fake */ override fun removeAt(p0: Int): @EnhancedNullability Int + + // CHECK: + // Mangled name: A#removeRange(kotlin.Int;kotlin.Int){} + // Public signature: /A.removeRange|7632320944993890593[0] + // Public signature debug description: removeRange(kotlin.Int;kotlin.Int){} + protected_and_package /* fake */ override fun removeRange(p0: Int, p1: Int): Unit + + // CHECK JVM_IR: + // Mangled name: A#retainAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /A.retainAll|-3550913358824719637[0] + // Public signature debug description: retainAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun retainAll(elements: Collection<@EnhancedNullability Int>): Boolean + + // CHECK JVM_IR: + // Mangled name: A#set(kotlin.Int;kotlin.Int{EnhancedNullability}){}kotlin.Int{EnhancedNullability} + // Public signature: /A.set|-7932912415931410975[0] + // Public signature debug description: set(kotlin.Int;kotlin.Int{EnhancedNullability}){}kotlin.Int{EnhancedNullability} + /* fake */ override operator fun set(index: Int, element: @EnhancedNullability Int): @EnhancedNullability Int + + // CHECK JVM_IR: + // Mangled name: A#subList(kotlin.Int;kotlin.Int){}kotlin.collections.MutableList{EnhancedNullability} + // Public signature: /A.subList|127837164145565172[0] + // Public signature debug description: subList(kotlin.Int;kotlin.Int){}kotlin.collections.MutableList{EnhancedNullability} + /* fake */ override fun subList(fromIndex: Int, toIndex: Int): @EnhancedNullability MutableList<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: A#toArray(){}kotlin.Array? + // Public signature: /A.toArray|-8468800257910341540[0] + // Public signature debug description: toArray(){}kotlin.Array? + /* fake */ override fun toArray(): Array? + + // CHECK JVM_IR: + // Mangled name: A#toArray(kotlin.Array?){0§}kotlin.Array? + // Public signature: /A.toArray|-7248906015406159030[0] + // Public signature debug description: toArray(kotlin.Array?){0§}kotlin.Array? + /* fake */ override fun toArray(p0: Array?): Array? + + // CHECK JVM_IR: + // Mangled name: A#toString(){}kotlin.String{EnhancedNullability} + // Public signature: /A.toString|7581629773206850948[0] + // Public signature debug description: toString(){}kotlin.String{EnhancedNullability} + /* fake */ override fun toString(): @EnhancedNullability String + + // CHECK: + // Mangled name: A#trimToSize(){} + // Public signature: /A.trimToSize|-5937642362792008740[0] + // Public signature debug description: trimToSize(){} + /* fake */ override fun trimToSize(): Unit + + // CHECK: + // Mangled name: A{}size + // Public signature: /A.size|-6253659984320132064[0] + // Public signature debug description: {}size + /* fake */ override val size: Int + // CHECK JVM_IR: + // Mangled name: A#(){}kotlin.Int + // Public signature: /A.size.|-3941649985161900780[0] + // Public signature debug description: (){}kotlin.Int + /* fake */ override get(): Int + +} + +// CHECK: +// Mangled name: KotlinClass +// Public signature: /KotlinClass|null[0] +open class KotlinClass : ArrayList { + // CHECK: + // Mangled name: KotlinClass#(){} + // Public signature: /KotlinClass.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + + // CHECK JVM_IR: + // Mangled name: KotlinClass#add(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /KotlinClass.add|7559962077055454748[0] + // Public signature debug description: add(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun add(element: @EnhancedNullability Int): Boolean + + // CHECK: + // Mangled name: KotlinClass#add(kotlin.Int;kotlin.Int{EnhancedNullability}){} + // Public signature: /KotlinClass.add|-3194712170900556378[0] + // Public signature debug description: add(kotlin.Int;kotlin.Int{EnhancedNullability}){} + /* fake */ override fun add(index: Int, element: @EnhancedNullability Int): Unit + + // CHECK JVM_IR: + // Mangled name: KotlinClass#addAll(kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + // Public signature: /KotlinClass.addAll|-8818439124580844723[0] + // Public signature debug description: addAll(kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun addAll(elements: @EnhancedNullability Collection<@EnhancedNullability Int>): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#addAll(kotlin.Int;kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + // Public signature: /KotlinClass.addAll|357368019962742687[0] + // Public signature debug description: addAll(kotlin.Int;kotlin.collections.Collection{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun addAll(index: Int, elements: @EnhancedNullability Collection<@EnhancedNullability Int>): Boolean + + // CHECK: + // Mangled name: KotlinClass#clear(){} + // Public signature: /KotlinClass.clear|-6446868449915108923[0] + // Public signature debug description: clear(){} + /* fake */ override fun clear(): Unit + + // CHECK JVM_IR: + // Mangled name: KotlinClass#clone(){}kotlin.Any{EnhancedNullability} + // Public signature: /KotlinClass.clone|178802004086941196[0] + // Public signature debug description: clone(){}kotlin.Any{EnhancedNullability} + /* fake */ override fun clone(): @EnhancedNullability Any + + // CHECK JVM_IR: + // Mangled name: KotlinClass#contains(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /KotlinClass.contains|3736388240191289860[0] + // Public signature debug description: contains(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override operator fun contains(element: @EnhancedNullability Int): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#containsAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /KotlinClass.containsAll|-6765067201579764726[0] + // Public signature debug description: containsAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun containsAll(elements: Collection<@EnhancedNullability Int>): Boolean + + // CHECK: + // Mangled name: KotlinClass#ensureCapacity(kotlin.Int){} + // Public signature: /KotlinClass.ensureCapacity|-7913402150632352615[0] + // Public signature debug description: ensureCapacity(kotlin.Int){} + /* fake */ override fun ensureCapacity(p0: Int): Unit + + // CHECK JVM_IR: + // Mangled name: KotlinClass#equals(kotlin.Any?{EnhancedNullability}){}kotlin.Boolean + // Public signature: /KotlinClass.equals|4126616015386471185[0] + // Public signature debug description: equals(kotlin.Any?{EnhancedNullability}){}kotlin.Boolean + /* fake */ override operator fun equals(other: @EnhancedNullability Any?): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#get(kotlin.Int){}kotlin.Int{EnhancedNullability} + // Public signature: /KotlinClass.get|-8822924217357855534[0] + // Public signature debug description: get(kotlin.Int){}kotlin.Int{EnhancedNullability} + /* fake */ override operator fun get(index: Int): @EnhancedNullability Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#hashCode(){}kotlin.Int + // Public signature: /KotlinClass.hashCode|-8048879360829830756[0] + // Public signature debug description: hashCode(){}kotlin.Int + /* fake */ override fun hashCode(): Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#indexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + // Public signature: /KotlinClass.indexOf|866974352596659798[0] + // Public signature debug description: indexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + /* fake */ override fun indexOf(element: @EnhancedNullability Int): Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#isEmpty(){}kotlin.Boolean + // Public signature: /KotlinClass.isEmpty|-626562167393617703[0] + // Public signature debug description: isEmpty(){}kotlin.Boolean + /* fake */ override fun isEmpty(): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#iterator(){}kotlin.collections.MutableIterator{EnhancedNullability} + // Public signature: /KotlinClass.iterator|115627760567581658[0] + // Public signature debug description: iterator(){}kotlin.collections.MutableIterator{EnhancedNullability} + /* fake */ override operator fun iterator(): @EnhancedNullability MutableIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: KotlinClass#lastIndexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + // Public signature: /KotlinClass.lastIndexOf|1115527748420890033[0] + // Public signature debug description: lastIndexOf(kotlin.Int{EnhancedNullability}){}kotlin.Int + /* fake */ override fun lastIndexOf(element: @EnhancedNullability Int): Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#listIterator(){}kotlin.collections.MutableListIterator{EnhancedNullability} + // Public signature: /KotlinClass.listIterator|4960815808465755041[0] + // Public signature debug description: listIterator(){}kotlin.collections.MutableListIterator{EnhancedNullability} + /* fake */ override fun listIterator(): @EnhancedNullability MutableListIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: KotlinClass#listIterator(kotlin.Int){}kotlin.collections.MutableListIterator{EnhancedNullability} + // Public signature: /KotlinClass.listIterator|-2268028930611070307[0] + // Public signature debug description: listIterator(kotlin.Int){}kotlin.collections.MutableListIterator{EnhancedNullability} + /* fake */ override fun listIterator(index: Int): @EnhancedNullability MutableListIterator<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: KotlinClass#remove(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + // Public signature: /KotlinClass.remove|2933193249427016334[0] + // Public signature debug description: remove(kotlin.Int{EnhancedNullability}){}kotlin.Boolean + /* fake */ override fun remove(element: @EnhancedNullability Int): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#removeAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /KotlinClass.removeAll|-5493620261823900507[0] + // Public signature debug description: removeAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun removeAll(elements: Collection<@EnhancedNullability Int>): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#removeAt(kotlin.Int){}kotlin.Int{EnhancedNullability} + // Public signature: /KotlinClass.removeAt|6480490686215931144[0] + // Public signature debug description: removeAt(kotlin.Int){}kotlin.Int{EnhancedNullability} + /* fake */ override fun removeAt(p0: Int): @EnhancedNullability Int + + // CHECK: + // Mangled name: KotlinClass#removeRange(kotlin.Int;kotlin.Int){} + // Public signature: /KotlinClass.removeRange|7632320944993890593[0] + // Public signature debug description: removeRange(kotlin.Int;kotlin.Int){} + protected_and_package /* fake */ override fun removeRange(p0: Int, p1: Int): Unit + + // CHECK JVM_IR: + // Mangled name: KotlinClass#retainAll(kotlin.collections.Collection){}kotlin.Boolean + // Public signature: /KotlinClass.retainAll|-3550913358824719637[0] + // Public signature debug description: retainAll(kotlin.collections.Collection){}kotlin.Boolean + /* fake */ override fun retainAll(elements: Collection<@EnhancedNullability Int>): Boolean + + // CHECK JVM_IR: + // Mangled name: KotlinClass#set(kotlin.Int;kotlin.Int{EnhancedNullability}){}kotlin.Int{EnhancedNullability} + // Public signature: /KotlinClass.set|-7932912415931410975[0] + // Public signature debug description: set(kotlin.Int;kotlin.Int{EnhancedNullability}){}kotlin.Int{EnhancedNullability} + /* fake */ override operator fun set(index: Int, element: @EnhancedNullability Int): @EnhancedNullability Int + + // CHECK JVM_IR: + // Mangled name: KotlinClass#subList(kotlin.Int;kotlin.Int){}kotlin.collections.MutableList{EnhancedNullability} + // Public signature: /KotlinClass.subList|127837164145565172[0] + // Public signature debug description: subList(kotlin.Int;kotlin.Int){}kotlin.collections.MutableList{EnhancedNullability} + /* fake */ override fun subList(fromIndex: Int, toIndex: Int): @EnhancedNullability MutableList<@EnhancedNullability Int> + + // CHECK JVM_IR: + // Mangled name: KotlinClass#toArray(){}kotlin.Array? + // Public signature: /KotlinClass.toArray|-8468800257910341540[0] + // Public signature debug description: toArray(){}kotlin.Array? + /* fake */ override fun toArray(): Array? + + // CHECK JVM_IR: + // Mangled name: KotlinClass#toArray(kotlin.Array?){0§}kotlin.Array? + // Public signature: /KotlinClass.toArray|-7248906015406159030[0] + // Public signature debug description: toArray(kotlin.Array?){0§}kotlin.Array? + /* fake */ override fun toArray(p0: Array?): Array? + + // CHECK JVM_IR: + // Mangled name: KotlinClass#toString(){}kotlin.String{EnhancedNullability} + // Public signature: /KotlinClass.toString|7581629773206850948[0] + // Public signature debug description: toString(){}kotlin.String{EnhancedNullability} + /* fake */ override fun toString(): @EnhancedNullability String + + // CHECK: + // Mangled name: KotlinClass#trimToSize(){} + // Public signature: /KotlinClass.trimToSize|-5937642362792008740[0] + // Public signature debug description: trimToSize(){} + /* fake */ override fun trimToSize(): Unit + + // CHECK: + // Mangled name: KotlinClass{}size + // Public signature: /KotlinClass.size|-6253659984320132064[0] + // Public signature debug description: {}size + /* fake */ override val size: Int + // CHECK JVM_IR: + // Mangled name: KotlinClass#(){}kotlin.Int + // Public signature: /KotlinClass.size.|-3941649985161900780[0] + // Public signature debug description: (){}kotlin.Int + /* fake */ override get(): Int + +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java index 10c571ce649..d824241ef2b 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java @@ -540,6 +540,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest runTest("compiler/testData/ir/irText/declarations/kt52677.kt"); } + @Test + @TestMetadata("kt65432.kt") + public void testKt65432() throws Exception { + runTest("compiler/testData/ir/irText/declarations/kt65432.kt"); + } + @Test @TestMetadata("localClassWithOverrides.kt") public void testLocalClassWithOverrides() throws Exception {