Skip to content

Commit

Permalink
Switch from @allowConversions to into, but warnings are given
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Mar 2, 2024
1 parent 3069244 commit b1b2348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/quantifiable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ extension [UnitsType <: Measure](inline quantity: Quantity[UnitsType])
${Quantitative.norm[UnitsType, UnitsType2]('quantity)}

@targetName("times2")
transparent inline infix def * [UnitsType2 <: Measure](@convertible inline quantity2: Quantity[UnitsType2])
transparent inline infix def * [UnitsType2 <: Measure](inline quantity2: into Quantity[UnitsType2])
: Any =
${Quantitative.multiply[UnitsType, UnitsType2]('quantity, 'quantity2, false)}

@targetName("divide2")
transparent inline infix def / [UnitsType2 <: Measure]
(@convertible inline quantity2: Quantity[UnitsType2]): Any =
(inline quantity2: into Quantity[UnitsType2]): Any =
${Quantitative.multiply[UnitsType, UnitsType2]('quantity, 'quantity2, true)}

transparent inline def sqrt(using sqrt: SquareRoot[Quantity[UnitsType]]): sqrt.Result = sqrt.sqrt(quantity)
Expand Down

0 comments on commit b1b2348

Please sign in to comment.