Render JVM default flags in kotlinp

This commit is contained in:
Alexander Udalov
2021-11-08 23:33:37 +01:00
parent c552b5f820
commit f5dd0abb76
7 changed files with 155 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
// !JVM_DEFAULT_MODE: all
interface A {
fun f() {}
fun g()
}
interface B : A {
override fun g() {}
}
class C : B
+40
View File
@@ -0,0 +1,40 @@
// A.class
// ------------------------------------------
// requires compiler version 1.4.0 (level=ERROR)
public abstract interface A : kotlin/Any {
// signature: f()V
public open fun f(): kotlin/Unit
// signature: g()V
public abstract fun g(): kotlin/Unit
// module name: test-module
// has method bodies in interface
}
// B.class
// ------------------------------------------
// requires compiler version 1.4.0 (level=ERROR)
public abstract interface B : A {
// signature: g()V
public open fun g(): kotlin/Unit
// module name: test-module
// has method bodies in interface
}
// C.class
// ------------------------------------------
public final class C : B {
// signature: <init>()V
public constructor()
// module name: test-module
}
// META-INF/test-module.kotlin_module
// ------------------------------------------
module {
}
@@ -0,0 +1,12 @@
// !JVM_DEFAULT_MODE: all-compatibility
interface A {
fun f() {}
fun g()
}
interface B : A {
override fun g() {}
}
class C : B
@@ -0,0 +1,48 @@
// A.class
// ------------------------------------------
public abstract interface A : kotlin/Any {
// signature: f()V
public open fun f(): kotlin/Unit
// signature: g()V
public abstract fun g(): kotlin/Unit
// module name: test-module
// has method bodies in interface
// is compiled in compatibility mode
}
// A$DefaultImpls.class
// ------------------------------------------
synthetic class
// B.class
// ------------------------------------------
public abstract interface B : A {
// signature: g()V
public open fun g(): kotlin/Unit
// module name: test-module
// has method bodies in interface
// is compiled in compatibility mode
}
// B$DefaultImpls.class
// ------------------------------------------
synthetic class
// C.class
// ------------------------------------------
public final class C : B {
// signature: <init>()V
public constructor()
// module name: test-module
}
// META-INF/test-module.kotlin_module
// ------------------------------------------
module {
}