diff options
author | odersky <odersky@gmail.com> | 2017-03-13 21:00:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 21:00:05 +0100 |
commit | 921f8bffc18b19449b2c1ad68c32725a7b7532e2 (patch) | |
tree | 01a61853620bed7c8078755664490eb149db8e98 /compiler/src | |
parent | b3194406d8e1a28690faee12257b53f9dcf49506 (diff) | |
parent | 8997bf17e2994a5b5e2edd06835f4cdc543e57ed (diff) | |
download | dotty-921f8bffc18b19449b2c1ad68c32725a7b7532e2.tar.gz dotty-921f8bffc18b19449b2c1ad68c32725a7b7532e2.tar.bz2 dotty-921f8bffc18b19449b2c1ad68c32725a7b7532e2.zip |
Merge pull request #2087 from dotty-staging/fix/ParSetLike
Fix compilation of ParSetLike by itself
Diffstat (limited to 'compiler/src')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Checking.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala index 1ca7eb107..f822f8893 100644 --- a/compiler/src/dotty/tools/dotc/typer/Checking.scala +++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala @@ -357,7 +357,7 @@ object Checking { */ def checkNoPrivateLeaks(sym: Symbol, pos: Position)(implicit ctx: Context): Type = { class NotPrivate extends TypeMap { - var errors: List[String] = Nil + var errors: List[() => String] = Nil def accessBoundary(sym: Symbol): Symbol = if (sym.is(Private) || !sym.owner.isClass) sym.owner @@ -384,7 +384,7 @@ object Checking { var tp1 = if (isLeaked(tp.symbol)) { errors = - em"non-private $sym refers to private ${tp.symbol}\n in its type signature ${sym.info}" :: errors + (() => em"non-private $sym refers to private ${tp.symbol}\n in its type signature ${sym.info}") :: errors tp } else mapOver(tp) @@ -408,7 +408,7 @@ object Checking { } val notPrivate = new NotPrivate val info = notPrivate(sym.info) - notPrivate.errors.foreach(ctx.errorOrMigrationWarning(_, pos)) + notPrivate.errors.foreach(error => ctx.errorOrMigrationWarning(error(), pos)) info } |