Files
kotlin-fork/compiler/testData/codegen/box/invokedynamic/sam/specializedGenerics/covariantOverrideWithNNothing.kt
T
2021-02-12 16:52:30 +03:00

20 lines
324 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// SAM_CONVERSIONS: INDY
fun interface IFooNStr {
fun foo(x: Any): String?
}
fun interface IFooNN : IFooNStr {
override fun foo(x: Any): Nothing?
}
fun box(): String {
var r = "Failed"
IFooNN {
r = it.toString()
null
}.foo("OK")
return r
}