Files
kotlin-fork/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/withInlineClassParameter.kt
T
pyos 57c934987c JVM_IR: try to load mangled invoke from default lambdas
Old compiler versions still won't be able to load default lambdas
generated by JVM_IR, but this way we avoid incorrect behavior of
function references taking inline class types that unbox to Any.

 #KT-46601 Fixed
2021-05-18 10:48:31 +02:00

15 lines
252 B
Kotlin
Vendored

// SKIP_INLINE_CHECK_IN: inlineFun-1BDWgbU$default
// FILE: 1.kt
package test
inline class C(val x: String)
fun foo(c: C) = c.x
inline fun inlineFun(c: C, x: (C) -> String = ::foo) = x(c)
// FILE: 2.kt
import test.*
fun box() = inlineFun(C("OK"))