You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an inner quote selects a symbol that is defined in an outer quote we
need to transform it or reject it. The issue is that the inner quote
cannot contain a reference to the type of the class defined in the outer
quote. Any such reference is erased the parents of that class that are
statically know outside those quotes. If the selected symbol is
overriding a symbol in one of those statically known classes, we can use
that overridden symbol instead. If not we have to reject the code.
tree.symbol.allOverriddenSymbols.find(sym =>!isCaptured(sym.owner)) match
213
+
caseSome(sym) =>
214
+
// virtualize call on overridden symbol that is not defined in a non static class
215
+
transform(tree.qualifier.select(sym))
216
+
case _ =>
217
+
report.error(em"Can not use reference to staged local ${tree.symbol} defined in an outer quote.\n\nThis can work if ${tree.symbol.owner} would extend a top level interface that defines ${tree.symbol}.", tree)
0 commit comments