aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/parsing/Parsers.scala
diff options
context:
space:
mode:
authorEnno Runne <enno@runne.net>2017-02-27 16:31:30 +0100
committerEnno Runne <enno@runne.net>2017-02-27 16:31:30 +0100
commit8c406e9fc6c2f3dfe9beb76ee51dc4531e8824a8 (patch)
tree4382db670a7863fcd5705498b3f5caa719ee601a /compiler/src/dotty/tools/dotc/parsing/Parsers.scala
parent9202810e80997105a598a3298f1ac199d5324a23 (diff)
downloaddotty-8c406e9fc6c2f3dfe9beb76ee51dc4531e8824a8.tar.gz
dotty-8c406e9fc6c2f3dfe9beb76ee51dc4531e8824a8.tar.bz2
dotty-8c406e9fc6c2f3dfe9beb76ee51dc4531e8824a8.zip
Better location to indicate the error
Diffstat (limited to 'compiler/src/dotty/tools/dotc/parsing/Parsers.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/parsing/Parsers.scala2
1 files changed, 1 insertions, 1 deletions
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
}