b454fcc1e0
This is needed to avoid clashes between different dumps from different handlers
55 lines
1.1 KiB
Plaintext
Vendored
55 lines
1.1 KiB
Plaintext
Vendored
operator fun Int.compareTo(c: Char): Int {
|
|
return 0
|
|
}
|
|
|
|
fun testOverloadedCompareToCall(x: Int, y: Char): Boolean {
|
|
return less(arg0 = x.compareTo(c = y), arg1 = 0)
|
|
}
|
|
|
|
fun testOverloadedCompareToCallWithSmartCast(x: Any, y: Any): Boolean {
|
|
return when {
|
|
when {
|
|
x is Int -> y is Char
|
|
else -> false
|
|
} -> less(arg0 = x /*as Int */.compareTo(c = y /*as Char */), arg1 = 0)
|
|
else -> false
|
|
}
|
|
}
|
|
|
|
fun testEqualsWithSmartCast(x: Any, y: Any): Boolean {
|
|
return when {
|
|
when {
|
|
x is Int -> y is Char
|
|
else -> false
|
|
} -> EQEQ(arg0 = x, arg1 = y)
|
|
else -> false
|
|
}
|
|
}
|
|
|
|
class C {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
operator fun Int.compareTo(c: Char): Int {
|
|
return 0
|
|
}
|
|
|
|
fun testMemberExtensionCompareToCall(x: Int, y: Char): Boolean {
|
|
return less(arg0 = (<this>, x).compareTo(c = y), arg1 = 0)
|
|
}
|
|
|
|
fun testMemberExtensionCompareToCallWithSmartCast(x: Any, y: Any): Boolean {
|
|
return when {
|
|
when {
|
|
x is Int -> y is Char
|
|
else -> false
|
|
} -> less(arg0 = (<this>, x /*as Int */).compareTo(c = y /*as Char */), arg1 = 0)
|
|
else -> false
|
|
}
|
|
}
|
|
|
|
}
|