KT-13426: store map from ImplicitReceiver into KotlinType for implicit receiver smart casts
This commit is contained in:
@@ -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<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user