-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Price does not work on right side of * operator #314
Comments
There is no method with the signature: def*(that: A): Money in Price. Maybe there should be? Or maybe the compiler doesn't like that syntax? |
Nope, what is missing is this:
I can prepare a PR. |
I think what you propose should be added @mkotsbak but you asked for Price * A and it seems you are providing A * Price. Both should work and the override you propose provides one of them. If you make a PR, please add tests (and overrides) that cover both Price * A and A * Price. That will likely make the team happier and more likely for them to approve your PR quickly. |
Ah, sorry, title was wrong :) Jupp of course I added tests first..Numbers at left side of * Price should probably also be supported. |
#314: add missing operations with Price, Quantity and numbers
ScalaFiddle.scala:13: error: overloaded method value $times with alternatives:
( that: time.this.Frequency)energy.this.Power
( that: scala.this.Double)energy.this.Energy
cannot be applied to (market.this.Price[energy.this.Energy])
val compileError = energy * price
^
Am I missing any imports here or is there something missing on the operator * implementation of the unit types?
The text was updated successfully, but these errors were encountered: