Skip to content

Commit 38b231b

Browse files
committed
Fix inline printing of types
We should print the type symbol, not the class symbol, as otherwise abstract and alias types that are annotated with @showAsInline do not print correctly.
1 parent 7baf519 commit 38b231b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
165165
val leftArg = if (isRightAssoc && isInfixType(l)) "(" ~ argText(l) ~ ")" else argText(l)
166166
val rightArg = if (!isRightAssoc && isInfixType(r)) "(" ~ argText(r) ~ ")" else argText(r)
167167

168-
leftArg ~ " " ~ simpleNameString(op.classSymbol) ~ " " ~ rightArg
168+
leftArg ~ " " ~ simpleNameString(op.typeSymbol) ~ " " ~ rightArg
169169
}
170170

171171
homogenize(tp) match {

0 commit comments

Comments
 (0)