diff options
author | Martin Odersky <odersky@gmail.com> | 2015-12-14 18:06:55 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-12-15 17:51:23 +0100 |
commit | ad7333eb7ed2d891789f187c880d6bc64b1d9c26 (patch) | |
tree | 355de0b1792564dc5736499727a792b4c1b43b0f /src/dotty/tools/dotc/printing/PlainPrinter.scala | |
parent | c864e118e7bd04dcbd0503ab9af6729fda94ff3f (diff) | |
download | dotty-ad7333eb7ed2d891789f187c880d6bc64b1d9c26.tar.gz dotty-ad7333eb7ed2d891789f187c880d6bc64b1d9c26.tar.bz2 dotty-ad7333eb7ed2d891789f187c880d6bc64b1d9c26.zip |
Print bounds of TypeVars only when option is enabled.
Diffstat (limited to 'src/dotty/tools/dotc/printing/PlainPrinter.scala')
-rw-r--r-- | src/dotty/tools/dotc/printing/PlainPrinter.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index 9e5ab5d8c..8f9d70d4c 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -170,7 +170,8 @@ class PlainPrinter(_ctx: Context) extends Printer { val bounds = if (constr.contains(tp)) constr.fullBounds(tp.origin)(ctx.addMode(Mode.Printing)) else TypeBounds.empty - "(" ~ toText(tp.origin) ~ "?" ~ toText(bounds) ~ ")" + if (ctx.settings.YshowVarBounds.value) "(" ~ toText(tp.origin) ~ "?" ~ toText(bounds) ~ ")" + else toText(tp.origin) } case tp: LazyRef => "LazyRef(" ~ toTextGlobal(tp.ref) ~ ")" |