ca80ddb8ca
- For synthetic calls - For delegated constructor calls Also, I checked that for each toResolvedReference() (beside annotations) that converts candidate to the resolved reference, we run `runPCLARelatedTasksForCandidate()` in the same context. ^KT-65103 Fixed
30 lines
537 B
Kotlin
Vendored
30 lines
537 B
Kotlin
Vendored
// ISSUE: KT-65103
|
|
interface Consumer<in T>
|
|
|
|
public fun <T> buildConsumer(
|
|
block: (Consumer<T>) -> Unit
|
|
): T = "O" as T
|
|
|
|
public fun <T> materialize(): T = "K" as T
|
|
|
|
fun expectConsumerString(x: Consumer<String>) {}
|
|
|
|
fun foo1(x: Boolean) = when {
|
|
x -> buildConsumer {
|
|
expectConsumerString(it)
|
|
}
|
|
else -> materialize()
|
|
}
|
|
|
|
fun foo2(x: Boolean) =
|
|
if (x)
|
|
buildConsumer {
|
|
expectConsumerString(it)
|
|
}
|
|
else
|
|
materialize()
|
|
|
|
fun box(): String {
|
|
return foo1(true) + foo2(false)
|
|
}
|