Skip to content

Commit f0e0117

Browse files
committed
Avoid edge case where non-sensical info was printed for selections
1 parent 51050f9 commit f0e0117

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
940940
tree.hasType && tree.symbol.exists && ctx.settings.YprintSyms.value
941941

942942
protected def nameIdText[T <: Untyped](tree: NameTree[T]): Text =
943-
if (tree.hasType && tree.symbol.exists) {
943+
if (tree.hasType && tree.symbol.exists && tree.symbol.isType == tree.name.isTypeName) {
944944
val str = nameString(tree.symbol)
945945
tree match {
946946
case tree: RefTree => withPos(str, tree.sourcePos)

0 commit comments

Comments
 (0)