diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index 94d9a383292..85fd78ff175 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -5023,6 +5023,16 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/collections/inheritFromHashtable.kt"); } + @TestMetadata("internalRemove.kt") + public void testInternalRemove() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemove.kt"); + } + + @TestMetadata("internalRemoveFromJava.kt") + public void testInternalRemoveFromJava() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemoveFromJava.kt"); + } + @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/ToArrayLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/ToArrayLowering.kt index 4a1da573b3b..e5a653ef204 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/ToArrayLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/ToArrayLowering.kt @@ -49,11 +49,11 @@ private class ToArrayLowering(private val context: JvmBackendContext) : ClassLow it.origin != IrDeclarationOrigin.IR_EXTERNAL_JAVA_DECLARATION_STUB }?.isCollectionSubClass == true - irClass.findOrCreate(indirectCollectionSubClass, { it.isGenericToArray(context) }) { + irClass.findOrCreate(indirectCollectionSubClass, { it.isGenericToArray(context) }) { bridge -> irClass.addFunction { name = Name.identifier("toArray") origin = JvmLoweredDeclarationOrigin.TO_ARRAY - modality = Modality.OPEN + modality = if (bridge != null) Modality.FINAL else Modality.OPEN }.apply { val elementType = addTypeParameter { name = Name.identifier("T") @@ -67,19 +67,26 @@ private class ToArrayLowering(private val context: JvmBackendContext) : ClassLow } val prototype = addValueParameter("array", returnType, JvmLoweredDeclarationOrigin.TO_ARRAY) body = context.createIrBuilder(symbol).irBlockBody { - +irReturn(irCall(symbols.genericToArray, symbols.genericToArray.owner.returnType).apply { - putValueArgument(0, irGet(receiver)) - putValueArgument(1, irGet(prototype)) - }) + if (bridge == null) { + +irReturn(irCall(symbols.genericToArray, symbols.genericToArray.owner.returnType).apply { + putValueArgument(0, irGet(receiver)) + putValueArgument(1, irGet(prototype)) + }) + } else { + +irReturn(irCall(bridge.target.symbol, bridge.target.returnType).apply { + dispatchReceiver = irGet(receiver) + putValueArgument(0, irGet(prototype)) + }) + } } } } - irClass.findOrCreate(indirectCollectionSubClass, IrSimpleFunction::isNonGenericToArray) { + irClass.findOrCreate(indirectCollectionSubClass, IrSimpleFunction::isNonGenericToArray) { bridge -> irClass.addFunction { name = Name.identifier("toArray") origin = JvmLoweredDeclarationOrigin.TO_ARRAY - modality = Modality.OPEN + modality = if (bridge != null) Modality.FINAL else Modality.OPEN returnType = context.irBuiltIns.arrayClass.typeWith(context.irBuiltIns.anyNType) }.apply { val receiver = addDispatchReceiver { @@ -87,28 +94,49 @@ private class ToArrayLowering(private val context: JvmBackendContext) : ClassLow origin = JvmLoweredDeclarationOrigin.TO_ARRAY } body = context.createIrBuilder(symbol).irBlockBody { - +irReturn(irCall(symbols.nonGenericToArray, symbols.nonGenericToArray.owner.returnType).apply { - putValueArgument(0, irGet(receiver)) - }) + if (bridge == null) { + +irReturn(irCall(symbols.nonGenericToArray, symbols.nonGenericToArray.owner.returnType).apply { + putValueArgument(0, irGet(receiver)) + }) + } else { + +irReturn(irCall(bridge.target.symbol, bridge.target.returnType).apply { + dispatchReceiver = irGet(receiver) + }) + } } } } } - private fun IrClass.findOrCreate(indirectSubclass: Boolean, matcher: (IrSimpleFunction) -> Boolean, fallback: () -> IrSimpleFunction) { + private class ToArrayBridge( + val target: IrSimpleFunction + ) + + private fun IrClass.findOrCreate( + indirectSubclass: Boolean, + matcher: (IrSimpleFunction) -> Boolean, + fallback: (ToArrayBridge?) -> IrSimpleFunction + ) { val existing = functions.find(matcher) if (existing != null) { // This is an explicit override of a method defined in `kotlin.collections.AbstractCollection` // or `java.util.Collection`. From here on, the frontend will check the existence of implementations; // we just need to match visibility in the former case to the latter. - existing.visibility = DescriptorVisibilities.PUBLIC + if (existing.visibility == DescriptorVisibilities.INTERNAL) { + // If existing `toArray` is internal, create a public bridge method + // to preserve binary compatibility with code generated by the old back-end. + // NB This will preserve existing custom `toArray` signature. + fallback(ToArrayBridge(existing)) + } else { + existing.visibility = DescriptorVisibilities.PUBLIC + } return } if (indirectSubclass) { // There's a Kotlin class up the hierarchy that should already have `toArray`. return } - fallback() + fallback(null) } } diff --git a/compiler/testData/codegen/box/collections/internalRemove.kt b/compiler/testData/codegen/box/collections/internalRemove.kt new file mode 100644 index 00000000000..fe3d0cab133 --- /dev/null +++ b/compiler/testData/codegen/box/collections/internalRemove.kt @@ -0,0 +1,16 @@ +class Test : Collection { + override val size: Int get() = TODO() + override fun contains(element: T): Boolean = TODO() + override fun containsAll(elements: Collection): Boolean = TODO() + override fun isEmpty(): Boolean = TODO() + override fun iterator(): Iterator = TODO() + + internal fun remove(x: T): Boolean = false +} + +fun box(): String { + return if (Test().remove("") == false) + "OK" + else + "Fail" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/collections/internalRemoveFromJava.kt b/compiler/testData/codegen/box/collections/internalRemoveFromJava.kt new file mode 100644 index 00000000000..a0853c60115 --- /dev/null +++ b/compiler/testData/codegen/box/collections/internalRemoveFromJava.kt @@ -0,0 +1,34 @@ +// TARGET_BACKEND: JVM + +// IGNORE_BACKEND: JVM +// ^ KT-43334 AbstractMethodError when calling 'remove' from Java on a Kotlin Collection with custom internal 'remove' +// fixed in JVM_IR + +// FILE: internalRemoveFromJava.kt + +class Test : Collection { + override val size: Int get() = TODO() + override fun contains(element: T): Boolean = TODO() + override fun containsAll(elements: Collection): Boolean = TODO() + override fun isEmpty(): Boolean = TODO() + override fun iterator(): Iterator = TODO() + + internal fun remove(x: T): Boolean = false +} + +fun box(): String { + val t = Test() + return if (J.testRemove(t, "") == false) + "OK" + else + "Fail" +} + +// FILE: J.java +import java.util.Collection; + +public class J { + public static boolean testRemove(Collection c, T x) { + return c.remove(x); + } +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove.kt new file mode 100644 index 00000000000..f0bbaf295f0 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove.kt @@ -0,0 +1,9 @@ +class Test : Collection { + override val size: Int get() = TODO() + override fun contains(element: T): Boolean = TODO() + override fun containsAll(elements: Collection): Boolean = TODO() + override fun isEmpty(): Boolean = TODO() + override fun iterator(): Iterator = TODO() + + internal fun remove(x: T): Boolean = false +} \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove.txt new file mode 100644 index 00000000000..cf39eca98d7 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove.txt @@ -0,0 +1,19 @@ +@kotlin.Metadata +public final class Test { + // source: 'collectionWithInternalRemove.kt' + public method (): void + public method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public method getSize(): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public final method remove$test_module(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove_ir.txt new file mode 100644 index 00000000000..49e7e15485b --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove_ir.txt @@ -0,0 +1,20 @@ +@kotlin.Metadata +public final class Test { + // source: 'collectionWithInternalRemove.kt' + public method (): void + public method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public method getSize(): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public final method remove$test_module(p0: java.lang.Object): boolean + public bridge final method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/customNonGenericToArray_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/customNonGenericToArray_ir.txt index 5643251b8e4..9fb603f4fd6 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/customNonGenericToArray_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/customNonGenericToArray_ir.txt @@ -15,7 +15,8 @@ public final class InternalToArray { public method removeAll(p0: java.util.Collection): boolean public method retainAll(p0: java.util.Collection): boolean public bridge final method size(): int - public final @org.jetbrains.annotations.NotNull method toArray(): java.lang.Integer[] + public final @org.jetbrains.annotations.NotNull method toArray$test_module(): java.lang.Integer[] + public final method toArray(): java.lang.Object[] public method toArray(p0: java.lang.Object[]): java.lang.Object[] } diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.kt new file mode 100644 index 00000000000..f6229852e82 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.kt @@ -0,0 +1,3 @@ +class InternalGenericToArray(d: Collection): Collection by d { + internal fun toArray(arr: Array): Array = null!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.txt new file mode 100644 index 00000000000..87f22b0a14f --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.txt @@ -0,0 +1,20 @@ +@kotlin.Metadata +public final class InternalGenericToArray { + // source: 'internalGenericToArray.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public method getSize(): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public final @org.jetbrains.annotations.NotNull method toArray$test_module(@org.jetbrains.annotations.NotNull p0: java.lang.Object[]): java.lang.Object[] + public method toArray(): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray_ir.txt new file mode 100644 index 00000000000..6b49f33a2e6 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray_ir.txt @@ -0,0 +1,21 @@ +@kotlin.Metadata +public final class InternalGenericToArray { + // source: 'internalGenericToArray.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public method getSize(): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public final @org.jetbrains.annotations.NotNull method toArray$test_module(@org.jetbrains.annotations.NotNull p0: java.lang.Object[]): java.lang.Object[] + public method toArray(): java.lang.Object[] + public final method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index de242c036d2..6e341c7966e 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -5053,6 +5053,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/collections/inheritFromHashtable.kt"); } + @TestMetadata("internalRemove.kt") + public void testInternalRemove() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemove.kt"); + } + + @TestMetadata("internalRemoveFromJava.kt") + public void testInternalRemoveFromJava() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemoveFromJava.kt"); + } + @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index 87f63b5435b..5399293cbda 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -344,6 +344,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt"); } + @TestMetadata("collectionWithInternalRemove.kt") + public void testCollectionWithInternalRemove() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove.kt"); + } + @TestMetadata("collectionsWithFullJdk.kt") public void testCollectionsWithFullJdk() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionsWithFullJdk.kt"); @@ -629,6 +634,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/customNonGenericToArray.kt"); } + @TestMetadata("internalGenericToArray.kt") + public void testInternalGenericToArray() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.kt"); + } + @TestMetadata("noToArrayInJava.kt") public void testNoToArrayInJava() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/noToArrayInJava.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index bc9ccf66974..75f5751ca61 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -5020,6 +5020,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Collections extends AbstractLightAnalysisModeTest { + @TestMetadata("internalRemoveFromJava.kt") + public void ignoreInternalRemoveFromJava() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemoveFromJava.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -5053,6 +5058,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/collections/inheritFromHashtable.kt"); } + @TestMetadata("internalRemove.kt") + public void testInternalRemove() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemove.kt"); + } + @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 74865be1a99..fb4fe1cefd9 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -5023,6 +5023,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/collections/inheritFromHashtable.kt"); } + @TestMetadata("internalRemove.kt") + public void testInternalRemove() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemove.kt"); + } + + @TestMetadata("internalRemoveFromJava.kt") + public void testInternalRemoveFromJava() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemoveFromJava.kt"); + } + @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java index 3bf0870ddbb..5b4a34b3657 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java @@ -344,6 +344,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt"); } + @TestMetadata("collectionWithInternalRemove.kt") + public void testCollectionWithInternalRemove() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionWithInternalRemove.kt"); + } + @TestMetadata("collectionsWithFullJdk.kt") public void testCollectionsWithFullJdk() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionsWithFullJdk.kt"); @@ -629,6 +634,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/customNonGenericToArray.kt"); } + @TestMetadata("internalGenericToArray.kt") + public void testInternalGenericToArray() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.kt"); + } + @TestMetadata("noToArrayInJava.kt") public void testNoToArrayInJava() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/noToArrayInJava.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 643c18b2124..1d871a46593 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -4123,6 +4123,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); } + @TestMetadata("internalRemove.kt") + public void testInternalRemove() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemove.kt"); + } + @TestMetadata("kt41123.kt") public void testKt41123() throws Exception { runTest("compiler/testData/codegen/box/collections/kt41123.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 707d42997f7..9618f4ee91b 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -4123,6 +4123,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); } + @TestMetadata("internalRemove.kt") + public void testInternalRemove() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemove.kt"); + } + @TestMetadata("kt41123.kt") public void testKt41123() throws Exception { runTest("compiler/testData/codegen/box/collections/kt41123.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index a788de84b29..599b2492b45 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -4123,6 +4123,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); } + @TestMetadata("internalRemove.kt") + public void testInternalRemove() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemove.kt"); + } + @TestMetadata("kt41123.kt") public void testKt41123() throws Exception { runTest("compiler/testData/codegen/box/collections/kt41123.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index 3eb24aef7aa..0870716ac09 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -2979,6 +2979,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/collections"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("internalRemove.kt") + public void testInternalRemove() throws Exception { + runTest("compiler/testData/codegen/box/collections/internalRemove.kt"); + } + @TestMetadata("removeClash.kt") public void testRemoveClash() throws Exception { runTest("compiler/testData/codegen/box/collections/removeClash.kt");