Skip to content

Commit c710d81

Browse files
committed
More user friendly printing of prototypes
FunProto and PolyProto now print without exposing internal names.
1 parent 1d09d41 commit c710d81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
232232
case dummyTreeOfType(tp) :: Nil if !(tp isRef defn.NullClass) => "null: " ~ toText(tp)
233233
case _ => toTextGlobal(args, ", ")
234234
}
235-
return "FunProto(" ~ (Str("given ") provided tp.isContextual) ~ argsText ~ "):" ~ toText(resultType)
235+
return "[applied to " ~ (Str("given ") provided tp.isContextual) ~ "(" ~ argsText ~ ") returning " ~ toText(resultType) ~ "]"
236236
case IgnoredProto(ignored) =>
237237
return "?" ~ (("(ignored: " ~ toText(ignored) ~ ")") provided ctx.settings.verbose.value)
238238
case tp @ PolyProto(targs, resType) =>
239-
return "PolyProto(" ~ toTextGlobal(targs, ", ") ~ "): " ~ toText(resType)
239+
return "[applied to [" ~ toTextGlobal(targs, ", ") ~ "] returning " ~ toText(resType)
240240
case _ =>
241241
}
242242
super.toText(tp)

0 commit comments

Comments
 (0)