Closed lrytz closed 10 months ago
Same underlying reason:
trait T {
def pm(x: Int) = 1
def pm(x: String) = 2
object p extends T {
def t = pm(1)
}
}
We get the warning in the overloaded case, but not if there's only one def pm
. Arguably we should warn when the prefixes don't match. Currently we just compare the symbols
if (defSym.exists && (defSym ne defSym0)) {
val ambiguity = ...
:heart: to Lukas. I thought both overloading and package object already arose as issues and addressed.
We could change "is ambiguous" to "may appear ambiguous"...
Gives a spurious warning