Skip to content

Commit f43654d

Browse files
committed
Address review
1 parent 0f0cd51 commit f43654d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/interactive/SourceTree.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ case class SourceTree(tree: tpd.NameTree, source: SourceFile) {
2222
NoSourcePosition
2323
else {
2424
// Constructors are named `<init>` in the trees, but `this` in the source.
25-
val nameLength = tree.name.stripModuleClassSuffix match {
25+
val nameLength = tree.name match {
2626
case nme.CONSTRUCTOR => nme.this_.toString.length
27-
case other => other.show.toString.length
27+
case other => other.stripModuleClassSuffix.show.toString.length
2828
}
2929
val position = {
3030
// FIXME: This is incorrect in some cases, like with backquoted identifiers,

0 commit comments

Comments
 (0)