Use receivers from candidate as a fallback during completion of callable references
^KT-45083 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
fe8f7cfcae
commit
750f327878
@@ -0,0 +1,19 @@
|
||||
// WITH_RUNTIME
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
object Hello {
|
||||
val hello = "hello"
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <E> buildList0(@BuilderInference builder: MutableList<E>.() -> Unit): List<E> = mutableListOf<E>().apply { builder() }
|
||||
|
||||
val numbers = buildList0 {
|
||||
add(Hello.let { it::hello }.get())
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
numbers
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user