Files
kotlin-fork/compiler/testData/codegen/box/traits/withRequired/simple.kt
T
Alexander Udalov 47d5f83d04 Report unmet trait requirements
#KT-3006 Fixed
2014-08-13 17:19:55 +04:00

12 lines
243 B
Kotlin

trait Trait : java.lang.Object {
fun foo(): String = "239 " + toString()
}
class Impl : Trait, java.lang.Object() {
override fun toString() = "Impl"
}
fun box(): String {
return if ("239 Impl" == Impl().foo()) "OK" else "Fail"
}