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