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
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public val x: kotlin.String? = null
|
||||
public fun foo(/*0*/ a: kotlin.String?): kotlin.Int?
|
||||
Reference in New Issue
Block a user