deprecating types after colon

This commit is contained in:
Dmitry Jemerov
2015-04-21 18:32:31 +02:00
parent b7a4b3c17d
commit f374eec8f1
268 changed files with 1055 additions and 769 deletions
+12 -10
View File
@@ -1,16 +1,18 @@
fun <T> checkSubtype(t: T) = t
fun test() : Unit {
var x : Int? = 0
var y : Int = 0
x : Int?
y : Int
x as Int : Int
y <warning>as Int</warning> : Int
x <warning>as Int?</warning> : Int?
y <warning>as Int?</warning> : Int?
x <warning>as Int?</warning> : Int?
y <warning>as? Int</warning> : Int?
x <warning>as? Int?</warning> : Int?
y <warning>as? Int?</warning> : Int?
checkSubtype<Int?>(x)
checkSubtype<Int>(y)
checkSubtype<Int>(x as Int)
checkSubtype<Int>(y <warning>as Int</warning>)
checkSubtype<Int?>(x <warning>as Int?</warning>)
checkSubtype<Int?>(y <warning>as Int?</warning>)
checkSubtype<Int?>(x <warning>as Int?</warning>)
checkSubtype<Int?>(y <warning>as? Int</warning>)
checkSubtype<Int?>(x <warning>as? Int?</warning>)
checkSubtype<Int?>(y <warning>as? Int?</warning>)
Unit
}