I know Scala can only mixin traits, it makes sense for dependency injection and cake pattern. My question is why I can still declare a class which need another "class" but not trait.
Code:
class C
class D { self : C =>}
This is still complied successfully. I thought it should failed compiled, because at this point how can new instance D (C is class not trait).
Edit:
when try to instantiate D:
new D with C //compilation fail class C needs to be a trait to be mixed in.