deprecating types after colon
This commit is contained in:
+4
-2
@@ -1,14 +1,16 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
trait A
|
||||
trait B : A
|
||||
|
||||
fun foo1(a: A, b: B): Boolean {
|
||||
val result = (a as B) == b
|
||||
<!DEBUG_INFO_SMARTCAST!>a<!> : B
|
||||
checkSubtype<B>(<!DEBUG_INFO_SMARTCAST!>a<!>)
|
||||
return result
|
||||
}
|
||||
|
||||
fun foo2(a: A, b: B): Boolean {
|
||||
val result = b == (a as B)
|
||||
<!DEBUG_INFO_SMARTCAST!>a<!> : B
|
||||
checkSubtype<B>(<!DEBUG_INFO_SMARTCAST!>a<!>)
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user