JVM_IR indy-SAM conversions: inline classes

KT-44278 KT-26060 KT-42621
This commit is contained in:
Dmitry Petrov
2021-01-21 17:39:46 +03:00
parent f30e25aa52
commit 1f16b96796
28 changed files with 721 additions and 50 deletions
@@ -6,11 +6,21 @@ fun interface IFoo<T> {
fun foo(x: T): T
}
fun foo1(fs: IFoo<Int>) = fs.foo(1)
fun interface IBar<T : Any> {
fun bar(x: T): T
}
fun foo1(foo: IFoo<Int>) = foo.foo(1)
fun bar1(bar: IBar<Int>) = bar.bar(1)
fun box(): String {
val t = foo1 { it + 41 }
if (t != 42) return "Failed: t=$t"
val tt = bar1 { it + 41 }
if (tt != 42) return "Failed: tt=$tt"
return "OK"
}