Skip to content

Commit 8c406e9

Browse files
committed
Better location to indicate the error
1 parent 9202810 commit 8c406e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ object Parsers {
20752075
val mods = modifiers(accessModifierTokens, annotsAsMods())
20762076
if (mods.hasAnnotations && !mods.hasFlags)
20772077
if (in.token == THIS) in.nextToken()
2078-
else syntaxError(AnnotatedPrimaryConstructorRequiresModifierOrThis(owner))
2078+
else syntaxError(AnnotatedPrimaryConstructorRequiresModifierOrThis(owner), mods.annotations.last.pos)
20792079
mods
20802080
}
20812081

0 commit comments

Comments
 (0)