deprecating types after colon
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
open data class A(private val x: Int)
|
||||
|
||||
class B : A(1) {
|
||||
@@ -6,6 +8,6 @@ class B : A(1) {
|
||||
|
||||
fun foo() {
|
||||
val b = B()
|
||||
b.component1() : String
|
||||
(b : A).<!INVISIBLE_MEMBER!>component1<!>() : Int
|
||||
checkSubtype<String>(b.component1())
|
||||
checkSubtype<Int>((checkSubtype<A>(b)).<!INVISIBLE_MEMBER!>component1<!>())
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(val x: Int, <!UNUSED_PARAMETER!>y<!>: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.component1() : Int
|
||||
checkSubtype<Int>(a.component1())
|
||||
a.<!UNRESOLVED_REFERENCE!>component2<!>()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(var x: Int, <!UNUSED_PARAMETER!>y<!>: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.component1() : Int
|
||||
checkSubtype<Int>(a.component1())
|
||||
a.<!UNRESOLVED_REFERENCE!>component2<!>()
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(val x: Int, val y: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
val (b, c) = a
|
||||
b : Int
|
||||
c : String
|
||||
checkSubtype<Int>(b)
|
||||
checkSubtype<String>(c)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(val x: Int, val y: String)
|
||||
|
||||
fun foo(arr: Array<A>) {
|
||||
for ((b, c) in arr) {
|
||||
b : Int
|
||||
c : String
|
||||
checkSubtype<Int>(b)
|
||||
checkSubtype<String>(c)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(val x: Int)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.component1() : Int
|
||||
checkSubtype<Int>(a.component1())
|
||||
a.<!UNRESOLVED_REFERENCE!>component2<!>()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(<!UNUSED_PARAMETER!>x<!>: Int, val y: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.component1() : String
|
||||
checkSubtype<String>(a.component1())
|
||||
a.<!UNRESOLVED_REFERENCE!>component2<!>()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(<!UNUSED_PARAMETER!>x<!>: Int, var y: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.component1() : String
|
||||
checkSubtype<String>(a.component1())
|
||||
a.<!UNRESOLVED_REFERENCE!>component2<!>()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(val x: Int, val y: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.component1() : Int
|
||||
a.component2() : String
|
||||
checkSubtype<Int>(a.component1())
|
||||
checkSubtype<String>(a.component2())
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
data class A(var x: Int, var y: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.component1() : Int
|
||||
a.component2() : String
|
||||
checkSubtype<Int>(a.component1())
|
||||
checkSubtype<String>(a.component2())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user