Skip to content

Commit c704791

Browse files
fix InlineMatch pos for summonFrom (#16025)
Use the span of all tree instead of only cases. This is needed for Metals: scalameta/metals#4366
2 parents 9cbc48b + 85b8856 commit c704791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ trait Applications extends Compatibility {
994994
case CaseDef(pat, _, _) =>
995995
report.error(UnexpectedPatternForSummonFrom(pat), pat.srcPos)
996996
}
997-
typed(untpd.InlineMatch(EmptyTree, cases).withSpan(arg.span), pt)
997+
typed(untpd.InlineMatch(EmptyTree, cases).withSpan(tree.span), pt)
998998
case _ =>
999999
errorTree(tree, em"argument to summonFrom must be a pattern matching closure")
10001000
}

0 commit comments

Comments
 (0)