trait A {
def foo = println("I am A." + super.toString)
}
trait B extends A {
override def foo = {
println("I am B." + super.toString)
super.foo
}
}
trait C extends A {
override def foo = {
println("I am C." + super.toString)
super.foo
}
}
object D extends A with B with C {
def fooo = {
println("I am D." + super.toString)
foo
}
}
D.fooo
// I am D.$line43.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$D$@4aa7bb1b
// I am C.$line43.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$D$@4aa7bb1b
// I am B.$line43.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$D$@4aa7bb1b
// I am A.$line43.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$D$@4aa7bb1b
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme