We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2067f5 commit 8c79d34Copy full SHA for 8c79d34
compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -199,8 +199,11 @@ object Applications {
199
else if (c.owner.isInlineMethod) c.owner.setFlag(Macro)
200
else if (!c.outer.owner.is(Package)) markAsMacro(c.outer)
201
val sym = tree.symbol
202
- if (sym.isSplice || sym.isQuote) {
203
- markAsMacro(ctx)
+ if (sym.isSplice) {
+ if (StagingContext.level == 0)
204
+ markAsMacro(ctx)
205
+ ctx.compilationUnit.needsStaging = true
206
+ } else if (sym.isQuote) {
207
ctx.compilationUnit.needsStaging = true
208
}
209
tests/pos/quoted-inline-quote.scala
@@ -0,0 +1,4 @@
1
+class Foo {
2
+ inline def foo(x: quoted.Expr[String]) = '{ println(${x}) }
3
+ foo('{"abc"})
4
+}
0 commit comments