Let’s say I have a Scala project with a bunch of case classes under package com.example.a.b.c. I want to import all these classes into a package com.example.c (which contains a few more non-conflicting case classes) so that anywhere else in my project, I only need to import com.example.c._ to use every case class both from com.example.c and com.example.a.b.c.
How can I do that?
There is discussion of adding an export mechanism which would do what you want, but it’s not clear whether that will happen.
In any case, for now the only way is to
So for example,
would need to be mimicked in another package with
When faced with this, people usually just settle for an extra import or two.