mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
JVM_IR: Fix inlining of interface methods
This commit is contained in:
committed by
max-kammerer
parent
bdec8b04e8
commit
9816e62d08
16
compiler/testData/codegen/bytecodeText/inline/interfaceDefaultMethod.kt
vendored
Normal file
16
compiler/testData/codegen/bytecodeText/inline/interfaceDefaultMethod.kt
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
interface A {
|
||||
private inline fun <reified T> callDefault(b: () -> String): String {
|
||||
"String" is T
|
||||
return b()
|
||||
}
|
||||
|
||||
fun ok() = callDefault<String> { "OK" }
|
||||
}
|
||||
|
||||
class B : A
|
||||
|
||||
fun box(): String {
|
||||
return B().ok()
|
||||
}
|
||||
|
||||
// 0 INVOKESTATIC A$DefaultImpls.callDefault
|
||||
Reference in New Issue
Block a user