JVM_IR: use indy SAM conversions in jvmTarget 1.8+, fix bridges
KT-44278 KT-26060 KT-42621
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
|
||||
fun interface IFoo<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
fun interface IFooUnit : IFoo<Unit> {
|
||||
override fun foo()
|
||||
}
|
||||
|
||||
fun <T> fooT(iFoo: IFoo<T>) = iFoo.foo()
|
||||
fun fooUnit(iFooUnit: IFooUnit) { iFooUnit.foo() }
|
||||
|
||||
var ok = "Failed"
|
||||
|
||||
fun box(): String {
|
||||
fooT { ok = "O" }
|
||||
fooUnit { ok += "K" }
|
||||
return ok
|
||||
}
|
||||
Reference in New Issue
Block a user