FIR checker: warn unnecessary safe calls

This commit is contained in:
Jinseong Jeon
2021-04-01 11:55:05 -07:00
committed by Mikhail Glukhikh
parent 2ecb6733ed
commit 5a0b75bd89
65 changed files with 232 additions and 349 deletions
@@ -10,7 +10,7 @@ fun <T: Any, E> T.foo(x : E, y : A) : T {
y plus 1
y + 1.0
this?.minus<T>(this)
this<!UNNECESSARY_SAFE_CALL!>?.<!>minus<T>(this)
return this
}
@@ -70,7 +70,7 @@ import outer.*
command?.equals1(null)
val c = Command()
c?.equals2(null)
c<!UNNECESSARY_SAFE_CALL!>?.<!>equals2(null)
if (command == null) 1
}