We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48af933 commit 2da015bCopy full SHA for 2da015b
docs/docs/reference/metaprogramming/macros.md
@@ -800,7 +800,7 @@ private def evalExpr(e: Expr[Int])(using Quotes): Expr[Int] = {
800
e match {
801
case '{ val y: Int = $x; $body(y): Int } =>
802
// body: Expr[Int => Int] where the argument represents references to y
803
- evalExpr(Expr.betaReduce(body)(evalExpr(x)))
+ evalExpr(Expr.betaReduce('{$body(${evalExpr(x)})}))
804
case '{ ($x: Int) * ($y: Int) } =>
805
(x.value, y.value) match
806
case (Some(a), Some(b)) => Expr(a * b)
0 commit comments