Skip to content

Incorect location for diagnostic on repeated modifier #17981

Closed
@ckipp01

Description

@ckipp01

Compiler version

3.3.2-RC1-bin-20230614-302be2f-NIGHTLY-git-302be2f

Minimized code

final final case class Foo()

Output

scala> final final case class Foo()
-- [E015] Syntax Error: --------------------------------------------------------
1 |final final case class Foo()
  |            ^^^^^
  |            Repeated modifier final
  |
  | longer explanation available when compiling with `-explain`

I also originally noticed this when trying the action shown in here since the code action was only able to be triggered when I was on class instead of final.

Expectation

I would expect that the ^^^ location and the actual diagnostic range to be covering the final modifiers since that's where the issue actual is.

Metadata

Metadata

Assignees

Labels

area:reportingError reporting including formatting, implicit suggestions, etcitype:bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions