diff options
author | Martin Odersky <odersky@gmail.com> | 2016-02-08 14:37:47 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-19 16:57:36 +0100 |
commit | 19026b87c47a5aeca98387f39f6d59fae5bec846 (patch) | |
tree | bc8c3d8dc94e81b81cb8e48b01d9d465225ffdf8 /src | |
parent | fc043bfb2e1c8fd0a73b87a4c955e3e09f6bf8c0 (diff) | |
download | dotty-19026b87c47a5aeca98387f39f6d59fae5bec846.tar.gz dotty-19026b87c47a5aeca98387f39f6d59fae5bec846.tar.bz2 dotty-19026b87c47a5aeca98387f39f6d59fae5bec846.zip |
Fix two private leaks in dotty compiler itself.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/printing/Disambiguation.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/typer/VarianceChecker.scala | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/printing/Disambiguation.scala b/src/dotty/tools/dotc/printing/Disambiguation.scala index 29b290f03..aa3fae2de 100644 --- a/src/dotty/tools/dotc/printing/Disambiguation.scala +++ b/src/dotty/tools/dotc/printing/Disambiguation.scala @@ -14,12 +14,12 @@ object Disambiguation { val variants = new mutable.HashMap[String, mutable.ListBuffer[Symbol]] } - def newPrinter: Context => Printer = { + def newPrinter: Context => RefinedPrinter = { val state = new State new Printer(state)(_) } - class Printer(state: State)(_ctx: Context) extends RefinedPrinter(_ctx) { + private class Printer(state: State)(_ctx: Context) extends RefinedPrinter(_ctx) { import state._ override def simpleNameString(sym: Symbol): String = { diff --git a/src/dotty/tools/dotc/typer/VarianceChecker.scala b/src/dotty/tools/dotc/typer/VarianceChecker.scala index bbe391726..b257ee192 100644 --- a/src/dotty/tools/dotc/typer/VarianceChecker.scala +++ b/src/dotty/tools/dotc/typer/VarianceChecker.scala @@ -13,7 +13,7 @@ import config.Printers.variances * The method should be invoked once for each Template. */ object VarianceChecker { - private case class VarianceError(tvar: Symbol, required: Variance) + case class VarianceError(tvar: Symbol, required: Variance) def check(tree: tpd.Tree)(implicit ctx: Context) = new VarianceChecker()(ctx).Traverser.traverse(tree) } |