You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should compile, but instead it fails with this error:
-- [E049] ReferenceError: eq.scala:6:0----------------------------------------6|objecteq|^|Reference to eq is ambiguous
|it is both imported by importfoo._|and imported subsequently by importbar._Explanation===========The compiler can't decide which of the possible choices you
are referencing with eq.
Note:-Definitions take precedence over imports
-Named imports take precedence over wildcard imports
-You may replace a name when imported using
importscala.{ eq=>eqTick }
The same things happen if instead of eq you have a definition explicitly defined on the objects.
If you only have a single eq method import, it compiles just fine. If you replace object eq with trait eq it's also fine.
The text was updated successfully, but these errors were encountered:
minimized code
expectation
This should compile, but instead it fails with this error:
The same things happen if instead of
eq
you have a definition explicitly defined on the objects.If you only have a single
eq
method import, it compiles just fine. If you replaceobject eq
withtrait eq
it's also fine.The text was updated successfully, but these errors were encountered: