KT-13426: store map from ImplicitReceiver into KotlinType for implicit receiver smart casts

This commit is contained in:
Mikhail Glukhikh
2016-08-15 17:17:18 +03:00
parent 33e96fcb9a
commit cbcef67d82
15 changed files with 265 additions and 8 deletions
@@ -0,0 +1,27 @@
interface IA
interface IB
interface IC
object Host : IB
object Prop : IA {
val Host.foo: Callee get() = Callee
}
object Callee
object Invoke : IC {
operator fun Callee.invoke() { }
}
fun test(a: IA, b: IB, c: IC) {
with(a) lambdaA@{
with(b) lambdaB@{
with(c) lambdaC@{
if (this@lambdaA is Prop && this@lambdaB is Host && this@lambdaC is Invoke) {
<!DEBUG_INFO_IMPLICIT_RECEIVER_SMARTCAST!>foo<!>()
}
}
}
}
}