diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt b/compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt new file mode 100644 index 00000000000..f05c357bffb --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt @@ -0,0 +1,73 @@ +abstract class A1 : MutableCollection { + override fun contains(o: Q): Boolean { + throw UnsupportedOperationException() + } + + override fun containsAll(c: Collection): Boolean { + throw UnsupportedOperationException() + } +} + +abstract class A2 : MutableCollection { + override fun contains(o: String): Boolean { + throw UnsupportedOperationException() + } + + override fun containsAll(c: Collection): Boolean { + throw UnsupportedOperationException() + } +} + +abstract class A3 : java.util.AbstractList() +abstract class A4 : java.util.AbstractList() { + override fun contains(o: W): Boolean { + throw UnsupportedOperationException() + } + + override fun containsAll(c: Collection): Boolean { + throw UnsupportedOperationException() + } +} + +abstract class A5 : java.util.AbstractList() +abstract class A6 : java.util.AbstractList() { + override fun contains(o: String): Boolean { + throw UnsupportedOperationException() + } + + override fun containsAll(c: Collection): Boolean { + throw UnsupportedOperationException() + } +} + +interface I1 : MutableSet { + override fun contains(o: R): Boolean { + throw UnsupportedOperationException() + } + + override fun containsAll(c: Collection): Boolean { + throw UnsupportedOperationException() + } +} + +interface I2 : MutableSet { + override fun contains(o: String): Boolean { + throw UnsupportedOperationException() + } + + override fun containsAll(c: Collection): Boolean { + throw UnsupportedOperationException() + } +} + +abstract class A7 : MutableCollection { + override fun contains(o: Int): Boolean { + throw UnsupportedOperationException() + } +} + +abstract class A8 : MutableCollection { + override fun contains(o: Any?): Boolean { + throw UnsupportedOperationException() + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/contains.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/contains.txt new file mode 100644 index 00000000000..e8bbeb837e9 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/contains.txt @@ -0,0 +1,104 @@ +@kotlin.jvm.internal.KotlinClass A1 { + public method (): void + public method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public abstract method getSize(): int + public final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.jvm.internal.KotlinClass A2 { + public method (): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public abstract method getSize(): int + public final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.jvm.internal.KotlinClass A3 { + public method (): void + public abstract method getSize(): int + public final method remove(p0: int): java.lang.Object + public synthetic method removeAt(p0: int): java.lang.Object + public final method size(): int +} + +@kotlin.jvm.internal.KotlinClass A4 { + public method (): void + public method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public abstract method getSize(): int + public final method remove(p0: int): java.lang.Object + public synthetic method removeAt(p0: int): java.lang.Object + public final method size(): int +} + +@kotlin.jvm.internal.KotlinClass A5 { + public method (): void + public abstract method getSize(): int + public final method remove(p0: int): java.lang.String + public synthetic method removeAt(p0: int): java.lang.String + public final method size(): int +} + +@kotlin.jvm.internal.KotlinClass A6 { + public method (): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public abstract method getSize(): int + public final method remove(p0: int): java.lang.String + public synthetic method removeAt(p0: int): java.lang.String + public final method size(): int +} + +@kotlin.jvm.internal.KotlinClass A7 { + public method (): void + public method contains(p0: int): boolean + public final method contains(p0: java.lang.Object): boolean + public abstract method getSize(): int + public final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.jvm.internal.KotlinClass A8 { + public method (): void + public method contains(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean + public abstract method getSize(): int + public final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.jvm.internal.KotlinInterfaceDefaultImpls @kotlin.jvm.internal.KotlinSyntheticClass I1$DefaultImpls { + inner class I1$DefaultImpls + public method contains(p0: I1, p1: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: I1, p1: java.util.Collection): boolean +} + +@kotlin.jvm.internal.KotlinClass I1 { + inner class I1$DefaultImpls + public abstract method contains(p0: java.lang.Object): boolean + public abstract method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public abstract method toArray(): java.lang.Object[] + public abstract method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.jvm.internal.KotlinInterfaceDefaultImpls @kotlin.jvm.internal.KotlinSyntheticClass I2$DefaultImpls { + inner class I2$DefaultImpls + public method contains(@org.jetbrains.annotations.NotNull p0: I2, p1: java.lang.String): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: I2, p1: java.util.Collection): boolean +} + +@kotlin.jvm.internal.KotlinClass I2 { + inner class I2$DefaultImpls + public abstract method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public abstract method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public abstract method toArray(): java.lang.Object[] + public abstract method toArray(p0: java.lang.Object[]): java.lang.Object[] +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index cb85c0db408..d82ce3d5c49 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -73,4 +73,19 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { doTest(fileName); } } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SpecialBridges extends AbstractBytecodeListingTest { + public void testAllFilesPresentInSpecialBridges() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("contains.kt") + public void testContains() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt"); + doTest(fileName); + } + } }