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
Even after #2458 the implementation still won't respect p.X, as it only looks for the first definition from enclosing scopes. The reference should be ambiguous because p.q.X is defined elsewhere.
package p {
class X {
override def toString() = "p.X"
}
package q {
//import p.X // "permanently hidden"
object Test extends App {
println(new X)
}
}
}
and in a different compilation unit:
package p.q
class X {
override def toString() = "p.q.X"
}
// similarly for package object q { type X = other }
The text was updated successfully, but these errors were encountered:
I'll give it another shot. Thanks, I'd forgotten about this one, which was the final nail in spec chapter 2. I'd say it's up for grabs like the bouquet at a wedding, but does anyone really want to get tied down to a total leftover no one understands or cares about? Also, "A foreign definition induces ambiguity" is my other political joke.
Even after #2458 the implementation still won't respect
p.X
, as it only looks for the first definition from enclosing scopes. The reference should be ambiguous becausep.q.X
is defined elsewhere.and in a different compilation unit:
The text was updated successfully, but these errors were encountered: