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
@@ -1,3 +1,5 @@
// !CHECK_TYPE
package a
fun <T> id(t: T): T = t
@@ -8,13 +10,13 @@ fun test() {
val <!UNUSED_VARIABLE!>a<!>: Float = id(2.0.toFloat())
val b = id(2.0)
b: Double
checkSubtype<Double>(b)
val c = either<Number>(1, 2.3)
c: Number
checkSubtype<Number>(c)
val d = either(11, 2.3)
d: Any
checkSubtype<Any>(d)
val <!UNUSED_VARIABLE!>e<!>: Float = <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>id<!>(1)
}