diff options
author | Martin Odersky <odersky@gmail.com> | 2013-06-19 04:45:24 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-06-19 04:48:11 +0200 |
commit | b2dcc777e5a6a1e6d1fff89c7fa794129ad5d135 (patch) | |
tree | 2bac3a26ea6f7d62d713206687ba631c3c1cfad5 /src/dotty/tools/dotc/printing | |
parent | 928a2a99288c3aa425654e63aea5ddc70359d4ac (diff) | |
download | dotty-b2dcc777e5a6a1e6d1fff89c7fa794129ad5d135.tar.gz dotty-b2dcc777e5a6a1e6d1fff89c7fa794129ad5d135.tar.bz2 dotty-b2dcc777e5a6a1e6d1fff89c7fa794129ad5d135.zip |
Taking accessibility into account for &, |
Changed the algorithm for & (and also |) to take accessibility into account. Fixed various problems that opened up when doing this.
Under -debug, new and old behavior of & are checked side-by-side and any discrepancy is noted.
Diffstat (limited to 'src/dotty/tools/dotc/printing')
-rw-r--r-- | src/dotty/tools/dotc/printing/PlainPrinter.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index 0ada9eac5..5766dd2ec 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -216,7 +216,9 @@ class PlainPrinter(_ctx: Context) extends Printer { val parentsText = Text(cparents.map(p => toTextLocal(reconstituteParent(cls, p))), " with ") val trueDecls = otherDecls.filterNot(treatAsTypeArg) - val declsText = if (trueDecls.isEmpty) Text() else dclsText(trueDecls) + val declsText = + if (trueDecls.isEmpty || !ctx.settings.debug.value) Text() + else dclsText(trueDecls) tparamsText ~ " extends " ~ parentsText ~ "{" ~ selfText ~ declsText ~ "} at " ~ preText case _ => |