mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Support default property reference inlining
This commit is contained in:
22
compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/functionReferenceFromObject.kt
vendored
Normal file
22
compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/functionReferenceFromObject.kt
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// FILE: 1.kt
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
||||
package test
|
||||
|
||||
fun ok() = "OK"
|
||||
|
||||
object A {
|
||||
fun ok() = "OK"
|
||||
}
|
||||
|
||||
inline fun inlineFun(lambda: () -> String = A::ok): String {
|
||||
return lambda()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return inlineFun()
|
||||
}
|
||||
Reference in New Issue
Block a user