We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5fc2be commit 7faecedCopy full SHA for 7faeced
compiler/src/dotty/tools/dotc/ast/Trees.scala
@@ -337,9 +337,11 @@ object Trees {
337
* a calling chain from `viewExists`), in that case the return position is NoPosition.
338
*/
339
def namePos =
340
- if (pos.exists)
341
- if (rawMods.is(Synthetic) || name.toTermName == nme.ERROR) Position(pos.point, pos.point)
342
- else Position(pos.point, pos.point + name.stripModuleClassSuffix.lastPart.length, pos.point)
+ if (pos.exists) {
+ val point = pos.point
+ if (rawMods.is(Synthetic) || name.toTermName == nme.ERROR) Position(point)
343
+ else Position(point, point + name.stripModuleClassSuffix.lastPart.length, point)
344
+ }
345
else pos
346
}
347
0 commit comments