CAST_NEVER_SUCCEEDS: do not report when casting nullable to nullable #KT-260 Fixed
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// From KT-13324: always succeeds
|
||||
val x = null <!USELESS_CAST!>as String?<!>
|
||||
// From KT-260: sometimes succeeds
|
||||
fun foo(a: String?): Int? {
|
||||
val c = a as? Int?
|
||||
return c
|
||||
}
|
||||
Reference in New Issue
Block a user