Highlighting "as Foo" for useless casts in gray.

#KT-6070 fixed
This commit is contained in:
Evgeny Gerashchenko
2014-11-28 21:33:52 +03:00
parent 20ee59c1e5
commit a3fdce8131
34 changed files with 60 additions and 53 deletions
+6 -6
View File
@@ -5,12 +5,12 @@ fun test() : Unit {
x : Int?
y : Int
x as Int : Int
y <warning>as</warning> Int : Int
x <warning>as</warning> Int? : Int?
y <warning>as</warning> 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>as?</warning> Int : Int?
x <warning>as?</warning> Int? : Int?
y <warning>as?</warning> 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
}
+1 -1
View File
@@ -3,6 +3,6 @@ fun test() {
1 : Int
<error>1</error> : Double
1 <warning>as</warning> Byte
1 <warning>as</warning> Int
1 <warning>as Int</warning>
1 <warning>as</warning> Double
}