deprecating types after colon
This commit is contained in:
+6
-4
@@ -1,23 +1,25 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
fun foo1(x: Number, cond: Boolean): Boolean {
|
||||
val result = cond && ((x as Int) == 42)
|
||||
<!TYPE_MISMATCH!>x<!> : Int
|
||||
checkSubtype<Int>(<!TYPE_MISMATCH!>x<!>)
|
||||
return result
|
||||
}
|
||||
|
||||
fun foo2(x: Number, cond: Boolean): Boolean {
|
||||
val result = ((x as Int) == 42) && cond
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!> : Int
|
||||
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>x<!>)
|
||||
return result
|
||||
}
|
||||
|
||||
fun foo3(x: Number, cond: Boolean): Boolean {
|
||||
val result = cond || ((x as Int) == 42)
|
||||
<!TYPE_MISMATCH!>x<!> : Int
|
||||
checkSubtype<Int>(<!TYPE_MISMATCH!>x<!>)
|
||||
return result
|
||||
}
|
||||
|
||||
fun foo4(x: Number, cond: Boolean): Boolean {
|
||||
val result = ((x as Int) == 42) || cond
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!> : Int
|
||||
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>x<!>)
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user