File tree 1 file changed +2
-0
lines changed
compiler/src/dotty/tools/dotc/transform 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -441,6 +441,8 @@ class Staging extends MacroTransformWithImplicits {
441
441
val hole = makeHole(body1, quotes, tpe).withPos(splice.pos)
442
442
// We do not place add the inline marker for trees that where lifted as they come from the same file as their
443
443
// enclosing quote. Any intemediate splice will add it's own Inlined node and cancel it before splicig the lifted tree.
444
+ // Note that lifted trees are not necessarily expressions and that Inlined nodes are expected to be expressions.
445
+ // For example we can have a lifted tree containing the LHS of an assignment (see tests/run-with-compiler/quote-var.scala).
444
446
if (splice.isType || outer.embedded.isLiftedSymbol(splice.qualifier.symbol)) hole
445
447
else Inlined (EmptyTree , Nil , hole)
446
448
}
You can’t perform that action at this time.
0 commit comments