FIR: report UNSAFE_CALL on dot when possible

This commit is contained in:
Mikhail Glukhikh
2021-01-29 10:25:59 +03:00
parent 0ee4f1f393
commit 7d4eaefd36
249 changed files with 1208 additions and 1649 deletions
@@ -13,7 +13,7 @@ fun g(a: SomeClass?) {
// 'a' can be cast to SomeSubClass
a.hashCode()
a.foo
(a as? SomeSubClass).<!UNSAFE_CALL!>foo<!>
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
(a as SomeSubClass).foo
}
val b = (a as? SomeSubClass)?.foo
@@ -21,7 +21,7 @@ fun g(a: SomeClass?) {
// 'a' can be cast to SomeSubClass
a.hashCode()
a.foo
(a as? SomeSubClass).<!UNSAFE_CALL!>foo<!>
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
(a as SomeSubClass).foo
}
val c = a as? SomeSubClass
@@ -29,7 +29,7 @@ fun g(a: SomeClass?) {
// 'a' and 'c' can be cast to SomeSubClass
a.hashCode()
a.foo
(a as? SomeSubClass).<!UNSAFE_CALL!>foo<!>
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
c.hashCode()
c.foo
}