From fa64b4b613fe5e78a5b4185b4aeda89e2f1446ff Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Mon, 6 Feb 2017 17:41:20 +0100 Subject: Trees#namePos: Correct position for objects --- compiler/src/dotty/tools/dotc/ast/Trees.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/ast') diff --git a/compiler/src/dotty/tools/dotc/ast/Trees.scala b/compiler/src/dotty/tools/dotc/ast/Trees.scala index 6dc2c9a13..b492de748 100644 --- a/compiler/src/dotty/tools/dotc/ast/Trees.scala +++ b/compiler/src/dotty/tools/dotc/ast/Trees.scala @@ -3,7 +3,7 @@ package dotc package ast import core._ -import Types._, Names._, Flags._, util.Positions._, Contexts._, Constants._ +import Types._, Names._, NameOps._, Flags._, util.Positions._, Contexts._, Constants._ import SymDenotations._, Symbols._, Denotations._, StdNames._, Comments._ import annotation.tailrec import language.higherKinds @@ -316,7 +316,7 @@ object Trees { def namePos = if (pos.exists) if (rawMods.is(Synthetic)) Position(pos.point, pos.point) - else Position(pos.point, pos.point + name.length, pos.point) + else Position(pos.point, pos.point + name.stripModuleClassSuffix.length, pos.point) else pos } -- cgit v1.2.3