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
When importing overloaded functions from two different objects, the compiler generates error when trying to use a function which has the same name regardless of the argument type.
Tested on 2.7.7.final and 2.7.3.final with the same result.
error: reference to sin is ambiguous;
it is imported twice in the same scope by
importFloatMath._
and importDoubleMath._
println(sin(1.0) + sin("1"))
It would be very helpful to import overloaded functions from different objects to enable splitting large libraries into separate files and possibly shipping them in separate jars.
An example of using mass import is when doing mathematics, as you can import all the trigonometric and other standard functions with one statement.
The text was updated successfully, but these errors were encountered:
@odersky said:
No use to micro-tune here. To go further of this we'd need a full new import spec proposal and that's at least a SID. No small thing to do, and nothing the Scala team has the resources for, right now.
When importing overloaded functions from two different objects, the compiler generates error when trying to use a function which has the same name regardless of the argument type.
Example:
Tested on 2.7.7.final and 2.7.3.final with the same result.
It would be very helpful to import overloaded functions from different objects to enable splitting large libraries into separate files and possibly shipping them in separate jars.
An example of using mass import is when doing mathematics, as you can import all the trigonometric and other standard functions with one statement.
The text was updated successfully, but these errors were encountered: