File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
compiler/src/dotty/tools/dotc/printing Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,16 @@ class PlainPrinter(_ctx: Context) extends Printer {
101101 protected def toTextRefinement (rt : RefinedType ) =
102102 (refinementNameString(rt) ~ toTextRHS(rt.refinedInfo)).close
103103
104- protected def globalPrecArgText (arg : Type ): Text = homogenizeArg(arg) match {
105- case arg : TypeBounds => " _" ~ toTextGlobal (arg)
106- case arg => toTextGlobal (arg)
104+ protected def argText (arg : Type ): Text = homogenizeArg(arg) match {
105+ case arg : TypeBounds => " _" ~ toText (arg)
106+ case arg => toText (arg)
107107 }
108108
109+ /** Pretty-print type `arg` for use when rendering a type argument (such as `T1` in `Foo[T1, T2]`), hence with
110+ * GlobalPrec precedence.
111+ */
112+ protected def globalPrecArgText (arg : Type ): Text = atPrec(GlobalPrec ) { argText(arg) }
113+
109114 /** The longest sequence of refinement types, starting at given type
110115 * and following parents.
111116 */
You can’t perform that action at this time.
0 commit comments