Skip to content

Commit c8265f1

Browse files
committed
Fix span of simple enum cases
The span should start with the enum case itself, not the preceding `case` keyword. This matters is there are many cases in a list.
1 parent 866ac14 commit c8265f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ object desugar {
895895
pats map {
896896
case id: Ident =>
897897
expandSimpleEnumCase(id.name.asTermName, mods,
898-
Span(pdef.span.start, id.span.end, id.span.start))
898+
Span(id.span.start, id.span.end, id.span.start))
899899
}
900900
else {
901901
val pats1 = if (tpt.isEmpty) pats else pats map (Typed(_, tpt))

0 commit comments

Comments
 (0)