deprecating types after colon
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import java.util.Collections
|
||||
|
||||
val ab = Collections.emptyList<Int>() : List<Int>?
|
||||
fun <T> checkSubtype(t: T) = t
|
||||
|
||||
val ab = checkSubtype<List<Int>?>(Collections.emptyList<Int>())
|
||||
@@ -1,18 +1,20 @@
|
||||
class Foo(var bar : Int, var barr : Int, var barrr : Int) {
|
||||
init {
|
||||
bar = 1
|
||||
barr = 1
|
||||
barrr = 1
|
||||
1 : Int
|
||||
this : Foo
|
||||
}
|
||||
fun <T> checkSubtype(t: T) = t
|
||||
|
||||
init {
|
||||
bar = 1
|
||||
this.bar
|
||||
1 : Int
|
||||
val <warning>a</warning> : Int =1
|
||||
this : Foo
|
||||
}
|
||||
class Foo(var bar : Int, var barr : Int, var barrr : Int) {
|
||||
init {
|
||||
bar = 1
|
||||
barr = 1
|
||||
barrr = 1
|
||||
checkSubtype<Int>(1)
|
||||
checkSubtype<Foo>(this)
|
||||
}
|
||||
|
||||
init {
|
||||
bar = 1
|
||||
this.bar
|
||||
checkSubtype<Int>(1)
|
||||
val <warning>a</warning> : Int =1
|
||||
checkSubtype<Foo>(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user