From 7c4a9ec39ad3c6302767442de34f53c28cc3bebb Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Mon, 20 Feb 2017 11:28:01 +0100 Subject: TempClassInfo#addSuspension: do not capture Context This capture did not cause any problem since we always called TempClassInfo#finalize with the same Context than we captured in `addSuspension`, but it's better to be explicit about these things. --- compiler/src/dotty/tools/dotc/core/TypeOps.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/core/TypeOps.scala') diff --git a/compiler/src/dotty/tools/dotc/core/TypeOps.scala b/compiler/src/dotty/tools/dotc/core/TypeOps.scala index c2a7d7ea6..308e6e306 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeOps.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeOps.scala @@ -401,12 +401,12 @@ trait TypeOps { this: Context => // TODO: Make standalone object. def forwardRefs(from: Symbol, to: Type, prefs: List[TypeRef]) = to match { case to @ TypeBounds(lo1, hi1) if lo1 eq hi1 => for (pref <- prefs) { - def forward(): Unit = + def forward()(implicit ctx: Context): Unit = for (argSym <- pref.decls) if (argSym is BaseTypeArg) forwardRef(argSym, from, to, cls, decls) pref.info match { - case info: TempClassInfo => info.addSuspension(forward) + case info: TempClassInfo => info.addSuspension(implicit ctx => forward()) case _ => forward() } } -- cgit v1.2.3