JVM IR: Don't generate line numbers and null checks in SAM wrapper constructors
This commit is contained in:
committed by
Alexander Udalov
parent
68e2d0d245
commit
8574cb4466
+24
@@ -0,0 +1,24 @@
|
||||
// FILE: J.java
|
||||
|
||||
public class J {
|
||||
public static void g(Runnable r) {
|
||||
r.run();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun nonInlineFun() {
|
||||
val f = {}
|
||||
J.g(f)
|
||||
}
|
||||
|
||||
inline fun inlineFun() {
|
||||
val f = {}
|
||||
J.g(f)
|
||||
}
|
||||
|
||||
// The SAM wrapper constructor is public inside of inline functions.
|
||||
// It has no other flags. In particular, it is not synthetic.
|
||||
// 1 access flags 0x0\n\s*<init>\(Lkotlin/jvm/functions/Function0;\)V
|
||||
// 1 access flags 0x1\n\s*public <init>\(Lkotlin/jvm/functions/Function0;\)V
|
||||
Reference in New Issue
Block a user