Skip to content

Commit 0daf178

Browse files
committed
Fix a bug where toExpr does not fully replace symbols
1 parent fe04dae commit 0daf178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ object QuoteMatcher {
566566
* f has a method type `(x: Int): Int` and `f` maps to `g`, `p` should hold
567567
* `g.apply(0)` because the type of `g` is `Int => Int` due to eta expansion.
568568
*/
569-
case Apply(fun, args) if env.contains(tree.symbol) => transform(fun).select(nme.apply).appliedToArgs(args)
569+
case Apply(fun, args) if env.contains(tree.symbol) => transform(fun).select(nme.apply).appliedToArgs(args.map(transform))
570570
case tree: Ident => env.get(tree.symbol).flatMap(argsMap.get).getOrElse(tree)
571571
case tree => super.transform(tree)
572572
}.transform(tree)

0 commit comments

Comments
 (0)