test that fails

This commit is contained in:
Dmitry Jemerov
2011-07-08 13:41:01 +02:00
parent a691de74bc
commit c302571bb2
2 changed files with 17 additions and 0 deletions
@@ -0,0 +1,13 @@
abstract open class Default {
fun defaultValue(): Int
}
class MyInt() {
class object : Default {
override fun defaultValue(): Int = 610
}
}
fun toDefault<T: Any> where class object T: Default(t: T) = T.defaultValue()
fun box(): String = if (toDefault<MyInt>(MyInt()) == 610) "OK" else "fail"