mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Support unbound callable function references in inliner
This commit is contained in:
13
compiler/testData/codegen/bytecodeText/callableReference/unboundFunReferenceInInline.kt
vendored
Normal file
13
compiler/testData/codegen/bytecodeText/callableReference/unboundFunReferenceInInline.kt
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
fun box(): String {
|
||||
return if (call(10, ::calc) == 5) "OK" else "fail"
|
||||
}
|
||||
|
||||
fun calc(p: Int): Int {
|
||||
return p / 2
|
||||
}
|
||||
|
||||
inline fun call(p: Int, s: (Int) -> Int): Int {
|
||||
return s(p)
|
||||
}
|
||||
|
||||
// 0 NEW
|
||||
Reference in New Issue
Block a user