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