e4cd0e004f
#KT-2825 In Progress
24 lines
531 B
Kotlin
24 lines
531 B
Kotlin
fun foo1(x: Number, cond: Boolean): Boolean {
|
|
val result = cond && ((x as Int) == 42)
|
|
<!TYPE_MISMATCH!>x<!> : Int
|
|
return result
|
|
}
|
|
|
|
fun foo2(x: Number, cond: Boolean): Boolean {
|
|
val result = ((x as Int) == 42) && cond
|
|
x : Int
|
|
return result
|
|
}
|
|
|
|
fun foo3(x: Number, cond: Boolean): Boolean {
|
|
val result = cond || ((x as Int) == 42)
|
|
<!TYPE_MISMATCH!>x<!> : Int
|
|
return result
|
|
}
|
|
|
|
fun foo4(x: Number, cond: Boolean): Boolean {
|
|
val result = ((x as Int) == 42) || cond
|
|
x : Int
|
|
return result
|
|
}
|