JVM_IR no nullability annotations on SAM wrapper constructor parameters

This commit is contained in:
Dmitry Petrov
2020-12-21 15:54:42 +03:00
parent 4780c73e40
commit c9d330207b
10 changed files with 52 additions and 220 deletions
@@ -1,24 +1,17 @@
// FILE: test.kt
fun test1() {
val f = { }
val t1 = Runnable(f)
val t2 = Runnable(f)
// WITH_RUNTIME
class A {
fun test1() {
val f = { }
val t1 = Runnable(f)
val t2 = Runnable(f)
}
}
fun test2() {
val t1 = getWrapped1()
val t2 = getWrapped2()
class B {
fun test2() {
val f = { }
val t1 = Runnable(f)
val t2 = Runnable(f)
}
}
// FILE: f1.kt
fun getWrapped1(): Runnable {
val f = { }
return Runnable(f)
}
// FILE: f2.kt
fun getWrapped2(): Runnable {
val f = { }
return Runnable(f)
}