Support warning about useless cast on safe cast

#KT-13348 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-04-07 04:56:59 +03:00
parent 107879a78a
commit 7f287a4230
12 changed files with 56 additions and 23 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ fun test() : Unit {
checkSubtype<Int?>(x as Int?)
checkSubtype<Int?>(y as Int?)
checkSubtype<Int?>(x as Int?)
checkSubtype<Int?>(y <warning descr="[USELESS_CAST] No cast needed">as? Int</warning>)
checkSubtype<Int?>(y as? Int)
checkSubtype<Int?>(x as? Int?)
checkSubtype<Int?>(y as? Int?)
Unit