Files
kotlin-fork/compiler/testData/codegen/boxWithStdlib/dataClasses/tostring/alreadyInherited.kt
T
Dmitry Petrov 7e9e427d4c Java 8 rules for method overrides:
- report errors on implementing methods of Any in interfaces
- update testData

~~~

Java 8 override restrictions: interface can't implement a method of 'Any'
- update compiler sources
2015-10-12 14:12:31 +03:00

10 lines
190 B
Kotlin
Vendored

abstract class SuperTrait {
override fun toString(): String = "!"
}
data class A(val x: Int): SuperTrait() {
}
fun box(): String {
return if (A(0).toString() == "!") "OK" else "fail"
}