Closed
Description
Minimized code
package bugs.shadowing
object x {
def f421() = 1
}
object y {
def f421() = true
}
import x.f421
import y.f421
object test {
println(f421())
}
Output
[error] 15 | println(f421())
[error] | ^^^^
[error] | Reference to f421 is ambiguous,
[error] | it is both imported by name by import dotty.DottyPredef.{...}
[error] | and imported by name subsequently by import bugs.shadowing.y.f421
[error] one error found
Expectation
[error] 15 | println(f421())
[error] | ^^^^
[error] | Reference to f421 is ambiguous,
[error] | it is both imported by name by import import bugs.shadowing.x.f421
[error] | and imported by name subsequently by import bugs.shadowing.y.f421
[error] one error found