JVM: Add more tests to jvm-abi-gen
This commit is contained in:
committed by
Alexander Udalov
parent
d08990ebb4
commit
8efb955ab5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
private val x = object { fun f() = 1 }
|
||||
|
||||
fun g() = x.f() + object { fun f() = 0 }.f()
|
||||
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun g() = 1
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
fun f() = 1
|
||||
val x = 2
|
||||
}
|
||||
|
||||
val y = 3
|
||||
fun g() = 4
|
||||
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
fun g() = 4
|
||||
val y = 3
|
||||
|
||||
class A {
|
||||
val x = 2
|
||||
fun f() = 1
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
inline fun f() = 1
|
||||
inline fun g() = 2
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
inline fun g() = 2
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
// This changes the line numbers in f, g
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
fun g() = f()
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
// IGNORE_BACKEND: JVM, JVM_IR
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
fun g() = f()
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
// This does not change the line numbers in f, but does change the line
|
||||
// numbers in the SourceDebug extension section which has to be rewritten.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
fun g() = 2
|
||||
fun h() = 3
|
||||
+1
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
fun h() = 3
|
||||
fun g() = 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
private inline fun f(): Int {
|
||||
return g()
|
||||
}
|
||||
|
||||
private inline fun g() = 1
|
||||
|
||||
fun h() = f()
|
||||
+1
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
|
||||
fun h() = f()
|
||||
|
||||
private inline fun g() = 1
|
||||
|
||||
private inline fun f(): Int {
|
||||
return g()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
private inline fun f() = { 1 }()
|
||||
fun g() = f()
|
||||
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun g() = 1
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
private val x = 1
|
||||
|
||||
// We don't yet strip out empty top-level classes from the kotlin_module files!
|
||||
val y = 2
|
||||
|
||||
object A { fun f() = x }
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
object A { fun f() = 1 }
|
||||
|
||||
val y = 2
|
||||
Reference in New Issue
Block a user