Skip to content

Commit cfc0ab5

Browse files
committed
revert workaround in BigDecimalToExpr
1 parent e77a929 commit cfc0ab5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

library/src/scala/quoted/ToExpr.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,7 @@ object ToExpr {
424424
/** Default implementation of `ToExpr[BigDecimal using the default MathContext]` */
425425
given BigDecimalToExpr: ToExpr[BigDecimal] with {
426426
def apply(x: BigDecimal)(using Quotes): Expr[BigDecimal] =
427-
val bigDecimal: String = "" + x // workaround "method toString in class BigDecimal does not take parameters" in scaladoc/generateScalaDocumentation
428-
'{ BigDecimal(${Expr(bigDecimal)}) }
427+
'{ BigDecimal(${Expr(x.toString)}) }
429428
}
430429

431430
/** Default implementation of `ToExpr[StringContext]` */

0 commit comments

Comments
 (0)