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
class In<in T>() {
fun f(<!UNUSED_PARAMETER!>t<!> : T) : Unit {}
fun f(<!UNUSED_PARAMETER!>t<!> : Int) : Int = 1
@@ -43,7 +45,7 @@ fun testInOut() {
(null <!CAST_NEVER_SUCCEEDS!>as<!> Inv<*>).<!UNRESOLVED_REFERENCE!>inf<!>(1) // !!
Inv<Int>().outf()
<!TYPE_MISMATCH!>(null <!CAST_NEVER_SUCCEEDS!>as<!> Inv<in Int>).outf()<!> : Int // Type mismatch
checkSubtype<Int>(<!TYPE_MISMATCH!>(null <!CAST_NEVER_SUCCEEDS!>as<!> Inv<in Int>).outf()<!>) // Type mismatch
(null <!CAST_NEVER_SUCCEEDS!>as<!> Inv<out Int>).outf()
(null <!CAST_NEVER_SUCCEEDS!>as<!> Inv<*>).outf()
@@ -5,5 +5,5 @@ trait Tr<T> {
fun test(t: Tr<*>) {
t.v = t
t.v checkType { it : _<Tr<*>> }
t.v checkType { _<Tr<*>>() }
}
@@ -7,5 +7,5 @@ trait Tr<T> {
fun test(t: Tr<*>) {
t.<!SETTER_PROJECTED_OUT!>v<!> = null!!
t.v checkType { it : _<Any?> }
t.v checkType { _<Any?>() }
}