Skip to content

Commit 0ec589c

Browse files
committed
Fix match-in-match marking of toplevel matches
1 parent 28453ba commit 0ec589c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/PrepareTransparent.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ object PrepareTransparent {
4949
def markTopLevelMatches(meth: Symbol, tree: untpd.Tree)(implicit ctx: Context): Unit = tree match {
5050
case tree: untpd.Match =>
5151
tree.putAttachment(TopLevelMatch, ())
52-
tree.cases.foreach(markTopLevelMatches(meth, _))
52+
for (cdef <- tree.cases) markTopLevelMatches(meth, cdef.body)
5353
case tree: untpd.Block =>
5454
markTopLevelMatches(meth, tree.expr)
5555
case _ =>

0 commit comments

Comments
 (0)