deprecating types after colon
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
+1
-1
@@ -5,5 +5,5 @@ trait Tr<T> {
|
||||
|
||||
fun test(t: Tr<*>) {
|
||||
t.v = t
|
||||
t.v checkType { it : _<Tr<*>> }
|
||||
t.v checkType { _<Tr<*>>() }
|
||||
}
|
||||
+1
-1
@@ -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?>() }
|
||||
}
|
||||
Reference in New Issue
Block a user