Do not generate toString and other methods if they are inherited.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
trait SuperTrait {
|
||||
public fun toString(): String = "!"
|
||||
}
|
||||
|
||||
data class A(val x: Int): SuperTrait {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return if (A(0).toString() == "!") "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user