Files
kotlin-fork/idea/testData/codegen/classes/classObjectMethod.jet
T
Dmitry Jemerov c302571bb2 test that fails
2011-07-08 13:41:01 +02:00

14 lines
305 B
Plaintext

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"