Skip to content

Fix compilation of ParSetLike by itself #2087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/typer/Checking.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
}

Expand Down
1 change: 1 addition & 0 deletions compiler/test/dotc/tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class tests extends CompilerTest {
|../scala-scala/src/library/scala/collection/SeqLike.scala
|../scala-scala/src/library/scala/collection/generic/GenSeqFactory.scala""".stripMargin)
@Test def compileIndexedSeq = compileLine("../scala-scala/src/library/scala/collection/immutable/IndexedSeq.scala")
@Test def compileParSetLike = compileLine("../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala")

@Test def dotty = {
dottyBootedLib
Expand Down