aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-29 20:37:38 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-29 20:40:20 +0200
commit290200037ba9633d1dc23dc02750c1396ee11045 (patch)
tree5694bd154d6947562dd3ef953f5d613c9822e72f /src
parent9ab6ce7c351e428d09a690cc8c841f0750fe8973 (diff)
downloaddotty-290200037ba9633d1dc23dc02750c1396ee11045.tar.gz
dotty-290200037ba9633d1dc23dc02750c1396ee11045.tar.bz2
dotty-290200037ba9633d1dc23dc02750c1396ee11045.zip
Index members of a class before evaluating its parents
Avoids missing member in tangledCompanion.scala, which is a minimization of intermittent failures in CollectionStrawMan6. Intermittent, because it depended on order of compilation. CollectionTests have to be compiled together with but before CollectionStrawMan6 (this was _sometimes_ the case because partest did not honor indicated compilation order so far). I.e. dotc CollectionTests_2.scala CollectionStrawMan6_1.scala would trigger the error. tangledCompanion.scala captures the dependencies in a single file.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 26c8f5c95..69ab35a7c 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -698,13 +698,14 @@ class Namer { typer: Typer =>
// the parent types are elaborated.
index(constr)
symbolOfTree(constr).ensureCompleted()
+
+ index(rest)(inClassContext(selfInfo))
val tparamAccessors = decls.filter(_ is TypeParamAccessor).toList
val parentTypes = ensureFirstIsClass(parents.map(checkedParentType(_, tparamAccessors)))
val parentRefs = ctx.normalizeToClassRefs(parentTypes, cls, decls)
typr.println(s"completing $denot, parents = $parents, parentTypes = $parentTypes, parentRefs = $parentRefs")
- index(rest)(inClassContext(selfInfo))
tempInfo.finalize(denot, parentRefs)
Checking.checkWellFormed(cls)