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
Syntax support for constant factor multiplication or division, aka 2 * q or q / 2, etc, using the new scala 3 extension feature, currently is not feasible.
SIP-54 will probably fix this, which lands in scala 3.4 scala/scala3#17660
scala>valr=Repro(2.0)
valr: coulomb.ops.syntax.coef.repro.Repro[Double] =Repro(2.0)
scala>2* r
valres0: coulomb.ops.syntax.coef.repro.Repro[Double] =Repro(4.0)
scala> r * r
-- [E007] TypeMismatchError:-------------------------------------------------1|r * r
|^|Found: (r : coulomb.ops.syntax.coef.repro.Repro[Double])
|Required:Int|| longer explanation available when compiling with`-explain`1 error found
scala> r /2valres1: coulomb.ops.syntax.coef.repro.Repro[Double] =Repro(1.0)
scala>2/ r
valres2: coulomb.ops.syntax.coef.repro.Repro[Double] =Repro(4.0)
scala> r / r
-- [E007] TypeMismatchError:-------------------------------------------------1|r / r
|^|Found: (r : coulomb.ops.syntax.coef.repro.Repro[Double])
|Required:Int|| longer explanation available when compiling with`-explain`1 error found
The text was updated successfully, but these errors were encountered:
Syntax support for constant factor multiplication or division, aka
2 * q
orq / 2
, etc, using the new scala 3extension
feature, currently is not feasible.SIP-54 will probably fix this, which lands in scala 3.4
scala/scala3#17660
Here is a simplified example of the failure:
The text was updated successfully, but these errors were encountered: