diff --git a/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt b/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt new file mode 100644 index 00000000000..abcac2a6138 --- /dev/null +++ b/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt @@ -0,0 +1,20 @@ +annotation class AllOpen + +@AllOpen +class Test { + val a = object : Runnable { + override fun run() { + 1 + } + } + + fun b() { + object : Runnable { + override fun run() { + 1 + } + } + + Runnable { 1 }.run() + } +} \ No newline at end of file diff --git a/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.txt b/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.txt new file mode 100644 index 00000000000..704c4031f84 --- /dev/null +++ b/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.txt @@ -0,0 +1,38 @@ +@java.lang.annotation.Retention +@kotlin.Metadata +public annotation class AllOpen + +@kotlin.Metadata +public final class Test$a$1 { + inner class Test$a$1 + method (): void + public method run(): void +} + +@kotlin.Metadata +public final class Test$b$1 { + inner class Test$b$1 + method (): void + public method run(): void +} + +@kotlin.Metadata +final class Test$b$2 { + public final static field INSTANCE: Test$b$2 + inner class Test$b$2 + static method (): void + method (): void + public final method run(): void +} + +@AllOpen +@kotlin.Metadata +public class Test { + private final @org.jetbrains.annotations.NotNull field a: java.lang.Runnable + inner class Test$a$1 + inner class Test$b$1 + inner class Test$b$2 + public method (): void + public method b(): void + public @org.jetbrains.annotations.NotNull method getA(): java.lang.Runnable +} diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java b/plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java index 46ecff1f568..3eb119af4d8 100644 --- a/plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java +++ b/plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java @@ -48,6 +48,12 @@ public class BytecodeListingTestForAllOpenGenerated extends AbstractBytecodeList doTest(fileName); } + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt"); + doTest(fileName); + } + @TestMetadata("explicitFinal.kt") public void testExplicitFinal() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/explicitFinal.kt");