Scala: keyword as package name

Spread the love

Question Description

I’m trying to use a Java library (no source code available) which defines some package. Scala complains about the presence of “object” in the package name, so I can’t import from it, and I can’t refer to its classes with fully qualified name either.

Is there a way around it?

Practice As Follows

Wrapping the object in a ` (the quote next to 1) should work.`object` 

Not what you're looking for? Browse other questions tagged

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.