Files
kotlin-fork/compiler/testData/codegen/box/invokedynamic/sam/covariantOverrideWithPrimitive.kt
T
Dmitry Petrov 052f6929c9 JVM_IR indy SAM conversions: update tests
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:30 +03:00

19 lines
297 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// SAM_CONVERSIONS: INDY
fun interface IFooAny {
fun foo(): Any
}
fun interface IFooInt : IFooAny {
override fun foo(): Int
}
fun box(): String {
val test = IFooInt { 42 }
if (test.foo() != 42)
return "Failed"
return "OK"
}