Scala: shorthand to import object Foo._ and trait Bar

Viewed 277

Have a recurring situation, petty I know, but I'd like to consolidate the following:

import com.company.model.FooDAO
import com.company.model.FooForm._

into something like:

import com.company.model.{FooDAO, FooForm._}

the above 1-liner does not compile, however.

The best I've managed is:

import com.company.model.FooDAO, com.company.model.FooForm._

Scala being Scala, I assume the compact form above is possible...

1 Answers
Related