Add tests extracted from regressions
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FILE: A.kt
|
||||
|
||||
interface A : B
|
||||
|
||||
fun box(): String = object : A {}.foo()
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
interface Base {
|
||||
fun foo(s: String = "OK"): String = s
|
||||
}
|
||||
|
||||
interface B : Base
|
||||
@@ -0,0 +1,12 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
class A {
|
||||
val s: Sequence<String> = sequence {
|
||||
val a = {}
|
||||
yield("OK")
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = A().s.single()
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.jvm.*
|
||||
import kotlin.test.assertNotNull
|
||||
|
||||
fun box(): String {
|
||||
assertNotNull({}.reflect())
|
||||
assertNotNull(Array(1) { {} }.single().reflect())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user