Do not report USELESS_CAST when casting null to nullable (special case)

This commit is contained in:
Mikhail Glukhikh
2016-08-09 16:48:11 +03:00
parent 8d537d294a
commit 687698da9a
2 changed files with 2 additions and 1 deletions
@@ -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?