separate compiler and plugin tests

This commit is contained in:
Dmitry Jemerov
2011-10-20 16:19:02 +02:00
parent a80398098b
commit ec6dec0d37
586 changed files with 69 additions and 42 deletions
@@ -0,0 +1,13 @@
abstract open class Default {
abstract fun defaultValue(): Int
}
class MyInt() {
class object : Default {
override fun defaultValue(): Int = 610
}
}
fun toDefault<T: Any>(t: T) where class object T: Default = T.defaultValue()
fun box(): String = if (toDefault<MyInt>(MyInt()) == 610) "OK" else "fail"