Files
kotlin-fork/compiler/testData/codegen/box/traits/simple.kt
T
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00

13 lines
292 B
Kotlin

trait SimpleClass : java.lang.Object {
fun foo() : String = "239 " + toString ()
}
class SimpleClassImpl() : SimpleClass {
override fun toString() = "SimpleClassImpl"
}
fun box() : String {
val c = SimpleClassImpl()
return if("239 SimpleClassImpl" == c.foo()) "OK" else "fail"
}