Report MEMBER_PROJECTED_OUT on calls with smart cast receiver

#KT-10856 Fixed
This commit is contained in:
Denis Zharkov
2016-01-29 15:35:17 +03:00
parent 05192547da
commit 9b3f557337
9 changed files with 80 additions and 5 deletions
@@ -0,0 +1,22 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Inv<E>
class C<R> {
fun bindTo(property: Inv<R>) {}
}
fun foo(x: Any?, y: C<*>) {
y.<!MEMBER_PROJECTED_OUT!>bindTo<!>("")
if (x is C<*>) {
<!DEBUG_INFO_SMARTCAST!>x<!>.<!MEMBER_PROJECTED_OUT!>bindTo<!>("")
with(<!DEBUG_INFO_SMARTCAST!>x<!>) {
<!MEMBER_PROJECTED_OUT!>bindTo<!>("")
}
}
with(x) {
if (this is C<*>) {
<!MEMBER_PROJECTED_OUT, DEBUG_INFO_IMPLICIT_RECEIVER_SMARTCAST!>bindTo<!>("")
}
}
}