7d59c7689c
Due to the direct invoke optimization, most callable reference tests were not generating callable references/lambdas.
21 lines
420 B
Kotlin
Vendored
21 lines
420 B
Kotlin
Vendored
class Foo {
|
|
private companion object {
|
|
lateinit var x: String
|
|
|
|
fun test() {
|
|
consume({ x }.let { it() });
|
|
{ consume(x) }.let { it() }
|
|
}
|
|
}
|
|
|
|
fun test2() {
|
|
consume({ x }.let { it() });
|
|
{ consume(x) }.let { it() }
|
|
}
|
|
}
|
|
|
|
fun consume(s: String) {}
|
|
|
|
// There's only one assertion in Foo.Companion.getX
|
|
// 1 throwUninitializedPropertyAccessException
|