Scala: package import conflicts

I import implicit: scala.concurrent.ExecutionContext.Implicits.global and before that I import global.Analytics.xyzMethod

where global is the directory in my package. However, for some reason scala all this global is the same as the first global. How do I resolve this?

+3


source to share


2 answers


Try the following:

import _root_.global.Analytics.xyzMethod

      



see also: scala package conflict

edit: I am unfortunately unable to properly solve the som-snytt problem. Please consider his comment.

+9


source


Use import rename:



import scala.concurrent.ExecutionContext.Implicits.{global => newName}

      

+11


source







All Articles