From 8c406e9fc6c2f3dfe9beb76ee51dc4531e8824a8 Mon Sep 17 00:00:00 2001 From: Enno Runne Date: Mon, 27 Feb 2017 16:31:30 +0100 Subject: Better location to indicate the error --- compiler/src/dotty/tools/dotc/parsing/Parsers.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/parsing/Parsers.scala') diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index f9187c5fe..b27bff37a 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -2075,7 +2075,7 @@ object Parsers { val mods = modifiers(accessModifierTokens, annotsAsMods()) if (mods.hasAnnotations && !mods.hasFlags) if (in.token == THIS) in.nextToken() - else syntaxError(AnnotatedPrimaryConstructorRequiresModifierOrThis(owner)) + else syntaxError(AnnotatedPrimaryConstructorRequiresModifierOrThis(owner), mods.annotations.last.pos) mods } -- cgit v1.2.3