Skip to content

Commit 974f706

Browse files
committed
Avoid printing expanded names
If a TypeRef with an expanded name is an alias type, print the alias instead.
1 parent ce53589 commit 974f706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
109109
return (toTextLocal(tycon) ~ "[" ~ Text(args map argText, ", ") ~ "]").close
110110
}
111111
case tp: TypeRef =>
112-
if ((tp.symbol is TypeParam | TypeArgument) && !ctx.phase.erasedTypes && !tp.symbol.isCompleting) {
112+
if ((tp.symbol is TypeParam | TypeArgument | ExpandedName) && !ctx.phase.erasedTypes && !tp.symbol.isCompleting) {
113113
tp.info match {
114114
case TypeAlias(hi) => return toText(hi)
115115
case _ => if (tp.prefix.isInstanceOf[ThisType]) return nameString(tp.symbol)

0 commit comments

Comments
 (0)