aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-22 16:12:16 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-22 16:12:16 +0200
commit1a3aeb147dff4875d8bf6701571babdaca9d869c (patch)
tree5463a6047564040ad40e588215d754d1c090a132 /src/dotty/tools/dotc/typer/Namer.scala
parentc37185d3307e2b02e25e888fd44d5e8bba95aa1d (diff)
downloaddotty-1a3aeb147dff4875d8bf6701571babdaca9d869c.tar.gz
dotty-1a3aeb147dff4875d8bf6701571babdaca9d869c.tar.bz2
dotty-1a3aeb147dff4875d8bf6701571babdaca9d869c.zip
Resume suspensions also when reading from classfiles
Make treatment in Scala2Unpickler and Namer the same and factor out common functionality.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala7
1 files changed, 3 insertions, 4 deletions
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)