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
Scala 2.13.3 deprecates auto-application of methods with empty parameter lists, see scala/scala#8833. Spire defines the unary - of Rational with an empty parameter list. Consequently negating a rational (i.e. -Rational.one) triggers the new deprecation warning, e.g. (with import spire.math.{Rational => R}):
Error:(49, 25) Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method unary_-,
or remove the empty argument list from its definition (Java-defined methods are exempt).
In Scala 3, an unapplied method like this will be eta-expanded into a function.
SnapToGrid(R.one, -R.one, Closed(R.zero))
I'm not sure whether this can be considered a bug in Scala 2.13.3, but it looks as if just removing the empty parameter list from spire.match.Rational.unary_- (i.e. defining it without any argument list) would fix this issue on the Spire side. Other numeric types in Spire (e.g. UByte) already define the unary - without parameter lists.
The text was updated successfully, but these errors were encountered:
Scala 2.13.3 deprecates auto-application of methods with empty parameter lists, see scala/scala#8833. Spire defines the unary
-
ofRational
with an empty parameter list. Consequently negating a rational (i.e.-Rational.one
) triggers the new deprecation warning, e.g. (withimport spire.math.{Rational => R})
:I'm not sure whether this can be considered a bug in Scala 2.13.3, but it looks as if just removing the empty parameter list from
spire.match.Rational.unary_-
(i.e. defining it without any argument list) would fix this issue on the Spire side. Other numeric types in Spire (e.g.UByte
) already define the unary - without parameter lists.The text was updated successfully, but these errors were encountered: