File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -356,8 +356,7 @@ object Checking {
356
356
*/
357
357
def checkNoPrivateLeaks (sym : Symbol , pos : Position )(implicit ctx : Context ): Type = {
358
358
class NotPrivate extends TypeMap {
359
- type Errors = List [(String , Position )]
360
- var errors : Errors = Nil
359
+ var errors : List [String ] = Nil
361
360
362
361
def accessBoundary (sym : Symbol ): Symbol =
363
362
if (sym.is(Private ) || ! sym.owner.isClass) sym.owner
@@ -383,8 +382,8 @@ object Checking {
383
382
val prevErrors = errors
384
383
var tp1 =
385
384
if (isLeaked(tp.symbol)) {
386
- errors = ( em " non-private $sym refers to private ${tp.symbol} \n in its type signature ${sym.info} " ,
387
- sym.pos) :: errors
385
+ errors =
386
+ em " non-private $sym refers to private ${tp.symbol} \n in its type signature ${ sym.info} " :: errors
388
387
tp
389
388
}
390
389
else mapOver(tp)
@@ -408,7 +407,7 @@ object Checking {
408
407
}
409
408
val notPrivate = new NotPrivate
410
409
val info = notPrivate(sym.info)
411
- notPrivate.errors.foreach { case (msg, pos) => ctx.errorOrMigrationWarning(msg , pos) }
410
+ notPrivate.errors.foreach( ctx.errorOrMigrationWarning(_ , pos))
412
411
info
413
412
}
414
413
You can’t perform that action at this time.
0 commit comments