File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ object Checking {
357
357
*/
358
358
def checkNoPrivateLeaks (sym : Symbol , pos : Position )(implicit ctx : Context ): Type = {
359
359
class NotPrivate extends TypeMap {
360
- var errors : List [String ] = Nil
360
+ var errors : List [() => String ] = Nil
361
361
362
362
def accessBoundary (sym : Symbol ): Symbol =
363
363
if (sym.is(Private ) || ! sym.owner.isClass) sym.owner
@@ -384,7 +384,7 @@ object Checking {
384
384
var tp1 =
385
385
if (isLeaked(tp.symbol)) {
386
386
errors =
387
- em " non-private $sym refers to private ${tp.symbol}\n in its type signature ${sym.info}" :: errors
387
+ (() => em " non-private $sym refers to private ${tp.symbol}\n in its type signature ${sym.info}" ) :: errors
388
388
tp
389
389
}
390
390
else mapOver(tp)
@@ -408,7 +408,7 @@ object Checking {
408
408
}
409
409
val notPrivate = new NotPrivate
410
410
val info = notPrivate(sym.info)
411
- notPrivate.errors.foreach(ctx.errorOrMigrationWarning(_ , pos))
411
+ notPrivate.errors.foreach(error => ctx.errorOrMigrationWarning(error() , pos))
412
412
info
413
413
}
414
414
Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ class tests extends CompilerTest {
224
224
|../scala-scala/src/library/scala/collection/SeqLike.scala
225
225
|../scala-scala/src/library/scala/collection/generic/GenSeqFactory.scala""" .stripMargin)
226
226
@ Test def compileIndexedSeq = compileLine(" ../scala-scala/src/library/scala/collection/immutable/IndexedSeq.scala" )
227
+ @ Test def compileParSetLike = compileLine(" ../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala" )
227
228
228
229
@ Test def dotty = {
229
230
dottyBootedLib
You can’t perform that action at this time.
0 commit comments