From b1b23488b3ed7d33c94a4ad8abf3f0fb583284bc Mon Sep 17 00:00:00 2001 From: Jon Pretty Date: Sat, 2 Mar 2024 15:47:25 +0100 Subject: [PATCH] Switch from `@allowConversions` to `into`, but warnings are given --- src/core/quantifiable.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/quantifiable.scala b/src/core/quantifiable.scala index c4a6698..13c77ed 100644 --- a/src/core/quantifiable.scala +++ b/src/core/quantifiable.scala @@ -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)