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