deprecating types after colon
This commit is contained in:
+4
-2
@@ -1,3 +1,5 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
trait A
|
||||
|
||||
trait B : A
|
||||
@@ -5,12 +7,12 @@ fun B.compareTo(b: B) = if (this == b) 0 else 1
|
||||
|
||||
fun foo(a: A): Boolean {
|
||||
val result = (a as B) < <!DEBUG_INFO_SMARTCAST!>a<!>
|
||||
<!DEBUG_INFO_SMARTCAST!>a<!> : B
|
||||
checkSubtype<B>(<!DEBUG_INFO_SMARTCAST!>a<!>)
|
||||
return result
|
||||
}
|
||||
|
||||
fun bar(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