JVM IR: Use raw types in SAM wrappers

This commit is contained in:
Steven Schäfer
2020-10-28 17:39:44 +01:00
committed by Alexander Udalov
parent 999151abac
commit a475fa2a21
10 changed files with 79 additions and 7 deletions
@@ -0,0 +1,29 @@
// FILE: J.java
public class J {
public interface F {
public int call(String x)
}
public static void g(F r) {
r.call(null);
}
}
// FILE: test.kt
fun nonInlineFun() {
val f: (String?) -> Int = { s -> 0 }
J.g(f)
}
inline fun inlineFun() {
val f: (String?) -> Int = { s -> 0 }
J.g(f)
}
// There should be no generic information in the SAM wrappers.
// 0 declaration: void <init>\(kotlin.jvm.functions.Function1<.*, .*>\)
// 0 declaration: function extends kotlin.jvm.functions.Function1<.*, .*>
// 2 private final synthetic Lkotlin/jvm/functions/Function1; function
// 2 <init>\(Lkotlin/jvm/functions/Function1;\)V