JET-126 Put 'where'-clause after the declaration

This commit is contained in:
Andrey Breslav
2011-07-08 22:44:56 +04:00
parent addfc6a421
commit c2435f0f24
13 changed files with 154 additions and 126 deletions
@@ -8,6 +8,6 @@ class MyInt() {
}
}
fun toDefault<T: Any> where class object T: Default(t: T) = T.defaultValue()
fun toDefault<T: Any>(t: T) where class object T: Default = T.defaultValue()
fun box(): String = if (toDefault<MyInt>(MyInt()) == 610) "OK" else "fail"