Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/compareBy.kt
T
Mikhael Bogdanov d11311ec20 Test compilation fix
2013-12-02 18:30:42 +04:00

9 lines
418 B
Kotlin
Vendored

class Item(val name: String, val rating: Int): Comparable<Item> {
public override fun compareTo(other: Item): Int {
return compareBy(this, other, { rating }, { name })
}
}
// from standard library
fun <T : Any> compareBy(<!UNUSED_PARAMETER!>a<!>: T?, <!UNUSED_PARAMETER!>b<!>: T?,
vararg <!UNUSED_PARAMETER!>functions<!>: T.() -> Comparable<*>?): Int = throw Exception()