Prefer stable types to diagnose useless cast
#KT-11622 Fixed
This commit is contained in:
+2
-2
@@ -8,11 +8,11 @@ fun test() : Unit {
|
||||
checkSubtype<Int>(y)
|
||||
checkSubtype<Int>(x as Int)
|
||||
checkSubtype<Int>(y <!USELESS_CAST!>as Int<!>)
|
||||
checkSubtype<Int?>(x <!USELESS_CAST!>as Int?<!>)
|
||||
checkSubtype<Int?>(x as Int?)
|
||||
checkSubtype<Int?>(y as Int?)
|
||||
checkSubtype<Int?>(x <!USELESS_CAST!>as? Int<!>)
|
||||
checkSubtype<Int?>(y <!USELESS_CAST!>as? Int<!>)
|
||||
checkSubtype<Int?>(x <!USELESS_CAST!>as? Int?<!>)
|
||||
checkSubtype<Int?>(x as? Int?)
|
||||
checkSubtype<Int?>(y as? Int?)
|
||||
|
||||
val <!UNUSED_VARIABLE!>s<!> = "" as Any
|
||||
|
||||
Reference in New Issue
Block a user