Drop traits with required classes
#KT-4771 Rejected
This commit is contained in:
-21
@@ -1,21 +0,0 @@
|
||||
open class Base {
|
||||
open fun sayHello(): String {
|
||||
return "O"
|
||||
}
|
||||
}
|
||||
|
||||
interface Trait: Base {
|
||||
override fun sayHello(): String {
|
||||
return "K"
|
||||
}
|
||||
}
|
||||
|
||||
class Derived(): Base(), Trait {
|
||||
override fun sayHello(): String {
|
||||
return super<Base>.sayHello() + super<Trait>.sayHello()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return Derived().sayHello()
|
||||
}
|
||||
Reference in New Issue
Block a user