Skip to content

Commit e349a3a

Browse files
committed
delete dead code
1 parent fc4ceae commit e349a3a

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -348,20 +348,6 @@ object Trees {
348348
if (rawMods.is(Synthetic) || name.toTermName == nme.ERROR) Span(point)
349349
else {
350350
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-
}
365351
Span(point, point + realName.length, point)
366352
}
367353
}

0 commit comments

Comments
 (0)