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
scalac-hash 3d248efcc~1 test.scala
topic/2.11-compat ~/code/spire scalac-hash 3d248efcc test.scala
test.scala:13: error: reference to sqrt is ambiguous;
it is both defined in object FastComplex and imported subsequently by
import java.lang.Math.sqrt
sqrt(0d)
^
one error found
@retronym said:
Actually, this looks like a progression, it is now consistent with a non-overloaded method in a package object and an example with nesting:
// Fails uniformly on 2.10 and 2.11objectEnc {
defsqrt(x: Double):Double=Math.sqrt(x)
defsqrt(x: String):Double=Math.sqrt(0)
objectFastComplex {
importjava.lang.Math.sqrt
sqrt(0d)
}
}
@retronym said:
... but at least the error message is wrong: "is both defined in object FastComplex". When I debugged, I saw that the method defined in the package object had somehow become owned by the module class FastComplex!
Regressed in scala/scala#1554
As seen in Spire: https://github.com/retronym/spire/tree/topic/2.11-compat
The text was updated successfully, but these errors were encountered: