mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +00:00
The old compiler will crash if it tries to inline a function that's passing a lambda parameter into the new parameter null check method `Intrinsics.checkNotNullParameter` because that usage is not considered as inlinable by the old compiler (it only knows about `Intrinsics.checkParameterIsNotNull`). Therefore we require that these functions can only be read by compilers of version 1.3.50 or greater. #KT-22275 Fixed
14 lines
463 B
Kotlin
Vendored
14 lines
463 B
Kotlin
Vendored
package test
|
|
|
|
inline fun doRun(f: () -> Unit) {}
|
|
|
|
// Note that although lambdas are not inlined in property accessors (neither in setter parameter, nor in extension receiver parameter),
|
|
// we still generate version requirements, just in case we support inlining here in the future.
|
|
inline var lambdaVarProperty: () -> Unit
|
|
get() = {}
|
|
set(value) { value() }
|
|
|
|
inline var (() -> String).extensionProperty: String
|
|
get() = this()
|
|
set(value) { this() }
|