[FIR] KT-37009: Fix loss of bound smart-cast due to synthetic removal

This commit is contained in:
simon.ogorodnik
2020-02-25 17:45:49 +03:00
parent ec936b7286
commit 7c4f59dfcb
11 changed files with 206 additions and 8 deletions
@@ -19,8 +19,8 @@ fun g(a: SomeClass?) {
val b = (a as? SomeSubClass)?.foo
if (b != null) {
// 'a' can be cast to SomeSubClass
a.<!INAPPLICABLE_CANDIDATE!>hashCode<!>()
a.<!UNRESOLVED_REFERENCE!>foo<!>
a.hashCode()
a.foo
(a as? SomeSubClass).<!INAPPLICABLE_CANDIDATE!>foo<!>
(a as SomeSubClass).foo
}