Allopen, minor: Add test for anonymous object
This commit is contained in:
committed by
Yan Zhulanow
parent
bc22b67995
commit
82dbba838a
@@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 <init>(): void
|
||||||
|
public method run(): void
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class Test$b$1 {
|
||||||
|
inner class Test$b$1
|
||||||
|
method <init>(): 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 <clinit>(): void
|
||||||
|
method <init>(): 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 <init>(): void
|
||||||
|
public method b(): void
|
||||||
|
public @org.jetbrains.annotations.NotNull method getA(): java.lang.Runnable
|
||||||
|
}
|
||||||
+6
@@ -48,6 +48,12 @@ public class BytecodeListingTestForAllOpenGenerated extends AbstractBytecodeList
|
|||||||
doTest(fileName);
|
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")
|
@TestMetadata("explicitFinal.kt")
|
||||||
public void testExplicitFinal() throws Exception {
|
public void testExplicitFinal() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/explicitFinal.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/explicitFinal.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user