Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Chyb <[email protected]>
  • Loading branch information
nicolasstucki and jchyb authored Mar 19, 2024
1 parent 676b250 commit 2bcf0db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object QuotePatterns:
def traverse(tree: Tree)(using Context): Unit = tree match {
case tree: SplicePattern =>
if !tree.body.typeOpt.derivesFrom(defn.QuotedExprClass) then
report.error(i"Spice pattern must match an Expr[...]", tree.body.srcPos)
report.error(i"Splice pattern must match an Expr[...]", tree.body.srcPos)
case tdef: TypeDef if tdef.symbol.isClass =>
val kind = if tdef.symbol.is(Module) then "objects" else "classes"
report.error(em"Implementation restriction: cannot match $kind", tree.srcPos)
Expand Down
2 changes: 1 addition & 1 deletion tests/neg-macros/i19941.check
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Error: tests/neg-macros/i19941.scala:7:14 ---------------------------------------------------------------------------
7 | case '{ ${hd *: tl} : *:[Int, EmptyTuple] } => '{ ??? } // error
| ^^^^^^^^
| Spice pattern must match an Expr[...]
| Splice pattern must match an Expr[...]

0 comments on commit 2bcf0db

Please sign in to comment.