Files
kotlin-fork/idea/testData/checker/Casts.kt
T
Evgeny Gerashchenko a3fdce8131 Highlighting "as Foo" for useless casts in gray.
#KT-6070 fixed
2014-12-08 17:30:47 +03:00

17 lines
640 B
Kotlin

fun test() : Unit {
var x : Int? = 0
var y : Int = 0
x : Int?
y : Int
x as Int : Int
y <warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">as Int</warning> : Int
x <warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">as Int?</warning> : Int?
y <warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">as Int?</warning> : Int?
x as? Int : Int?
y <warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">as? Int</warning> : Int?
x <warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">as? Int?</warning> : Int?
y <warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">as? Int?</warning> : Int?
Unit
}