use TypeCheckingProcedure for generating constraints

(in ConstraintSystemImpl)
This commit is contained in:
Svetlana Isakova
2013-02-27 21:00:40 +04:00
parent 871caaaa2d
commit 0530df6f7b
13 changed files with 202 additions and 201 deletions
@@ -0,0 +1,9 @@
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
inline fun <T : Any> compareBy(<!UNUSED_PARAMETER!>a<!>: T?, <!UNUSED_PARAMETER!>b<!>: T?,
vararg <!UNUSED_PARAMETER!>functions<!>: T.() -> Comparable<*>?): Int = throw Exception()