mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
15 lines
380 B
Kotlin
Vendored
15 lines
380 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
|
|
infix fun Int.compareTo(<!UNUSED_PARAMETER!>o<!>: Int) = 0
|
|
|
|
fun foo(a: Number): Int {
|
|
val result = (a as Int) compareTo <!DEBUG_INFO_SMARTCAST!>a<!>
|
|
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>a<!>)
|
|
return result
|
|
}
|
|
|
|
fun bar(a: Number): Int {
|
|
val result = 42 compareTo (a as Int)
|
|
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>a<!>)
|
|
return result
|
|
} |