File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -348,20 +348,6 @@ object Trees {
348
348
if (rawMods.is(Synthetic ) || name.toTermName == nme.ERROR ) Span (point)
349
349
else {
350
350
val realName = name.stripModuleClassSuffix.lastPart.toString
351
- val nameStart = // TODO: This is not used
352
- if (point != span.start) point
353
- else {
354
- // Point might be too far away from start to be recorded. In this case we fall back to scanning
355
- // forwards from the start offset for the name.
356
- // Note: This might be inaccurate since scanning might hit accidentally the same
357
- // name (e.g. in a comment) before finding the real definition.
358
- // To make this behavior more robust we'd have to change the trees for definitions to contain
359
- // a fully positioned Ident in place of a name.
360
- val contents = if source.exists then source.content() else Array .empty[Char ]
361
- val idx = contents.indexOfSlice(realName, point)
362
- if (idx >= 0 ) idx
363
- else point // use `point` anyway. This is important if no source exists so scanning fails
364
- }
365
351
Span (point, point + realName.length, point)
366
352
}
367
353
}
You can’t perform that action at this time.
0 commit comments