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 9e85373 commit e02a991Copy full SHA for e02a991
compiler/src/dotty/tools/dotc/transform/ReifyQuotes.scala
@@ -438,6 +438,13 @@ class ReifyQuotes extends MacroTransformWithImplicits {
438
val captured = mutable.LinkedHashMap.empty[Symbol, Tree]
439
val captured2 = capturer(captured)
440
outer.enteredSyms.foreach(s => capturers.put(s, captured2))
441
+ if (ctx.owner.owner.is(Macro)) {
442
+ outer.enteredSyms.foreach(s => {
443
+ assert(s.is(Param))
444
+ assert(s.owner == ctx.owner.owner)
445
+ captured2(ref(s).asInstanceOf[RefTree])
446
+ })
447
+ }
448
val tree2 = transform(tree)
449
capturers --= outer.enteredSyms
450
seq(captured.result().valuesIterator.toList, tree2)
0 commit comments