[JVM_IR] Do not use invoke-dynamic for targeting inline-only methods.
Fixes https://youtrack.jetbrains.com/issue/KT-46962
This commit is contained in:
committed by
teamcityserver
parent
5c2753b5d1
commit
886ce055f5
@@ -0,0 +1,21 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// WITH_RUNTIME
|
||||
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 java/lang/invoke/LambdaMetafactory
|
||||
|
||||
fun interface Consumer {
|
||||
fun foo(s: String)
|
||||
}
|
||||
|
||||
fun call(c: Consumer) {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
// println is inline only and therefore we cannot use invoke-dynamic to target it.
|
||||
call(::println)
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user