Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/ReifyQuotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
l == level ||
sym.is(Inline) && sym.owner.is(Macro) && sym.info.isValueType && l - 1 == level
case None =>
level == 0
!sym.is(Param) || levelOK(sym.owner)
}

/** Issue a "splice outside quote" error unless we ar in the body of an inline method */
Expand Down
3 changes: 3 additions & 0 deletions tests/pos/i4396a.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Test {
'(Option(4) match { case Some(a) => a; case None => 1 })
}
3 changes: 3 additions & 0 deletions tests/pos/i4396b.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Test {
'{ case class Foo() }
}