Files
kotlin-fork/compiler/testData/codegen/java8/box/jvm8/defaults/capturedSuperCall.kt
T
2018-04-03 19:18:09 +02:00

29 lines
393 B
Kotlin
Vendored

// !API_VERSION: 1.3
// JVM_TARGET: 1.8
// WITH_RUNTIME
interface IBase {
@kotlin.annotations.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()
}