1ddf889d8a
- for primitive types and kotlin.String, use IrBinaryOperatorExpression - for others, use call to 'compareTo'
10 lines
235 B
Kotlin
Vendored
10 lines
235 B
Kotlin
Vendored
interface IA
|
|
|
|
interface IB {
|
|
operator fun IA.compareTo(other: IA): Int
|
|
}
|
|
|
|
fun IB.test1(a1: IA, a2: IA) = a1 > a2
|
|
fun IB.test2(a1: IA, a2: IA) = a1 >= a2
|
|
fun IB.test3(a1: IA, a2: IA) = a1 < a2
|
|
fun IB.test4(a1: IA, a2: IA) = a1 <= a2 |