[NI] Don't loose inference session during property resolve

#KT-31620 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-05-23 17:45:11 +03:00
parent e7c99cd494
commit cc29ca02f8
16 changed files with 147 additions and 38 deletions
@@ -0,0 +1,17 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
// !USE_EXPERIMENTAL: kotlin.Experimental
import kotlin.experimental.ExperimentalTypeInference
interface Inv<T> {
fun send(e: T)
}
@UseExperimental(ExperimentalTypeInference::class)
fun <K> foo(@BuilderInference block: Inv<K>.() -> Unit) {}
fun test(i: Int) {
foo {
val p = send(i)
}
}
@@ -0,0 +1,11 @@
package
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ K> foo(/*0*/ @kotlin.BuilderInference block: Inv<K>.() -> kotlin.Unit): kotlin.Unit
public fun test(/*0*/ i: kotlin.Int): kotlin.Unit
public interface Inv</*0*/ T> {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public abstract fun send(/*0*/ e: T): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}