57c934987c
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
15 lines
252 B
Kotlin
Vendored
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"))
|