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 d97bce0 commit 12372b8Copy full SHA for 12372b8
compiler/src/dotty/tools/dotc/ast/Trees.scala
@@ -337,10 +337,10 @@ object Trees {
337
* a calling chain from `viewExists`), in that case the return position is NoPosition.
338
*/
339
def namePos =
340
- if (pos.exists)
+ if (pos.exists && name.toTermName != nme.ERROR)
341
if (rawMods.is(Synthetic)) Position(pos.point, pos.point)
342
else Position(pos.point, pos.point + name.stripModuleClassSuffix.lastPart.length, pos.point)
343
- else pos
+ else NoPosition
344
}
345
346
/** A ValDef or DefDef tree */
0 commit comments