JET-126 Put 'where'-clause after the declaration
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user