From 1a3aeb147dff4875d8bf6701571babdaca9d869c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 22 Jul 2016 16:12:16 +0200 Subject: Resume suspensions also when reading from classfiles Make treatment in Scala2Unpickler and Namer the same and factor out common functionality. --- src/dotty/tools/dotc/typer/Namer.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/dotty/tools/dotc/typer/Namer.scala') diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala index 20cf09846..26c8f5c95 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -688,8 +688,8 @@ class Namer { typer: Typer => else createSymbol(self) // pre-set info, so that parent types can refer to type params - val tempClassInfo = new TempClassInfo(cls.owner.thisType, cls, decls, selfInfo) - denot.info = tempClassInfo + val tempInfo = new TempClassInfo(cls.owner.thisType, cls, decls, selfInfo) + denot.info = tempInfo // Ensure constructor is completed so that any parameter accessors // which have type trees deriving from its parameters can be @@ -705,8 +705,7 @@ class Namer { typer: Typer => typr.println(s"completing $denot, parents = $parents, parentTypes = $parentTypes, parentRefs = $parentRefs") index(rest)(inClassContext(selfInfo)) - denot.info = ClassInfo(cls.owner.thisType, cls, parentRefs, decls, selfInfo) - tempClassInfo.suspensions.foreach(_()) + tempInfo.finalize(denot, parentRefs) Checking.checkWellFormed(cls) if (isDerivedValueClass(cls)) cls.setFlag(Final) -- cgit v1.2.3