In scala, we cannot extend object:
object
object X object Y extends X
gives an error error: not found: type X
error: not found: type X
I
If you want use methods and values from another object you can use import.
object X{ def x = 5 } object Y{ import X._ val y = x }