jvm-abi-gen: Add test to check the declaration order in interface jars

This commit is contained in:
Steven Schäfer
2021-12-01 13:40:02 +01:00
committed by Alexander Udalov
parent b8625cd233
commit 05695761ec
14 changed files with 69 additions and 18 deletions
@@ -0,0 +1,2 @@
// IGNORE_BACKEND_LEGACY: JVM
// IGNORE_BACKEND: JVM
@@ -0,0 +1,12 @@
@kotlin.Metadata
public final class test/A {
// source: 'test.kt'
public final @kotlin.jvm.JvmField field b: int
public field a: java.lang.String
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getA(): java.lang.String
public final method setA(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final method g(): void
public final method f(): void
public final method h(): void
}
+14
View File
@@ -0,0 +1,14 @@
package test
// The order of fields and methods is visible to annotation processors
// and thus part of the public ABI of a library.
class A {
@JvmField
val b: Int = 0
lateinit var a: String
fun g() {}
fun f() {}
fun h() {}
}