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.
2 parents cdbb1be + 16d2a4f commit f54e7aaCopy full SHA for f54e7aa
compiler/src/dotty/tools/dotc/transform/ReifyQuotes.scala
@@ -245,7 +245,7 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
245
l == level ||
246
sym.is(Inline) && sym.owner.is(Macro) && sym.info.isValueType && l - 1 == level
247
case None =>
248
- level == 0
+ !sym.is(Param) || levelOK(sym.owner)
249
}
250
251
/** Issue a "splice outside quote" error unless we ar in the body of an inline method */
tests/pos/i4396a.scala
@@ -0,0 +1,3 @@
1
+class Test {
2
+ '(Option(4) match { case Some(a) => a; case None => 1 })
3
+}
tests/pos/i4396b.scala
+ '{ case class Foo() }
0 commit comments