diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-12-03 18:47:01 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-12-03 18:47:01 +0000 |
commit | 627adab5dbddcef8bd57d2b40eaa6a6e40c06cab (patch) | |
tree | 2eb20e317f78612a2c2c8a47dc0e8f7420ddfd2d /src | |
parent | 3a783937bf97a9180e303da90cea8077f75d3e9b (diff) | |
download | scala-627adab5dbddcef8bd57d2b40eaa6a6e40c06cab.tar.gz scala-627adab5dbddcef8bd57d2b40eaa6a6e40c06cab.tar.bz2 scala-627adab5dbddcef8bd57d2b40eaa6a6e40c06cab.zip |
close #3951. review by dubochet.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 2 | ||||
-rwxr-xr-x | src/library/scala/reflect/generic/UnPickler.scala | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index e84ae10cee..e15328c6a1 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -63,7 +63,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => private var rawannots: List[AnnotationInfoBase] = Nil /* Used in namer to check whether annotations were already assigned or not */ - def rawAnnotations:List[AnnotationInfoBase] = rawannots + def rawAnnotations: List[AnnotationInfoBase] = rawannots /** After the typer phase (before, look at the definition's Modifiers), contains * the annotations attached to member a definition (class, method, type, field). diff --git a/src/library/scala/reflect/generic/UnPickler.scala b/src/library/scala/reflect/generic/UnPickler.scala index ed103a3a43..d04b882f0d 100755 --- a/src/library/scala/reflect/generic/UnPickler.scala +++ b/src/library/scala/reflect/generic/UnPickler.scala @@ -65,14 +65,23 @@ abstract class UnPickler { //println("unpickled " + classRoot + ":" + classRoot.rawInfo + ", " + moduleRoot + ":" + moduleRoot.rawInfo);//debug def run() { + // read children last, fix for #3951 + val queue = new collection.mutable.ListBuffer[() => Unit]() + def delay(i: Int, action: => Unit) { + queue += (() => at(i, {() => action; null})) + } + for (i <- 0 until index.length) { if (isSymbolEntry(i)) at(i, readSymbol) else if (isSymbolAnnotationEntry(i)) - at(i, {() => readSymbolAnnotation(); null}) + delay(i, readSymbolAnnotation()) else if (isChildrenEntry(i)) - at(i, {() => readChildren(); null}) + delay(i, readChildren()) } + + for (action <- queue) + action() } private def checkVersion() { |