Files
kotlin-fork/compiler/testData/codegen/java8/box/jvm8/defaults/capturedSuperCall.kt
T
Mikhael Bogdanov 08ff1de248 Update test data
2018-04-03 19:38:37 +02:00

30 lines
397 B
Kotlin
Vendored

// !API_VERSION: 1.3
// !ENABLE_JVM_DEFAULT
// JVM_TARGET: 1.8
// WITH_RUNTIME
interface IBase {
@JvmDefault
fun bar() = "OK"
}
open class Base {
fun foo() = "OK"
}
class C : Base(), IBase {
val lambda1 = {
super.foo()
}
val lambda2 = {
super.bar()
}
}
fun box(): String {
if (C().lambda1() != "OK") return "fail 1"
return C().lambda2()
}