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
pkg-import.scala:11: error: reference to C is ambiguous;
it is both defined in package p and imported subsequently by
import p._
def f = new C
^
pkg-import.scala:9: warning: Unused import
import p._ // warn
^
1 warning
1 error
but does not error at the same nesting level
package testsamepackageimport {
package p {
class C
}
package p {
import p._ // warn
package q {
class U {
def f = new C
}
}
}
}
Problem
It should only error if the competing import and definition resolve to different symbols.
The import is unused but not erroneous.
Scala 3 does not error.
The text was updated successfully, but these errors were encountered:
Reproduction steps
Scala version: 2.13.15
errors
but does not error at the same nesting level
Problem
It should only error if the competing import and definition resolve to different symbols.
The import is unused but not erroneous.
Scala 3 does not error.
The text was updated successfully, but these errors were encountered: