diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2011-12-12 20:36:47 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2011-12-12 20:36:47 +0100 |
commit | 9437b3528cdc5a9ab30d456ad2dedf0e802503bc (patch) | |
tree | 31bfa4721f90d7fe5b66cff45544625a719a6bfc /src | |
parent | b6617b091da1ac25c78c1e1323d4d3c9fad8abd7 (diff) | |
download | scala-9437b3528cdc5a9ab30d456ad2dedf0e802503bc.tar.gz scala-9437b3528cdc5a9ab30d456ad2dedf0e802503bc.tar.bz2 scala-9437b3528cdc5a9ab30d456ad2dedf0e802503bc.zip |
typeParams now performs one more completion
When tracking a problem in type inference during reflective compilation,
Martin and I have discovered that under certain circumstances typeParams
does not fully load the type.
During a debugging session we found out that info first had the type of
TopLevelCompleter, and after the load it was still not completed, having
the type of UnPickler$something$LazyTypeRef.
After that discovery it became apparent that typeParams need to behave
similarly to the info getter - allow for two completions, not just one.
Review by @odersky, @adriaanm.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/reflect/internal/Symbols.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/reflect/internal/Symbols.scala b/src/compiler/scala/reflect/internal/Symbols.scala index 75fd733e7e..bc0c81a54b 100644 --- a/src/compiler/scala/reflect/internal/Symbols.scala +++ b/src/compiler/scala/reflect/internal/Symbols.scala @@ -1097,6 +1097,10 @@ trait Symbols extends api.Symbols { self: SymbolTable => def typeParams: List[Symbol] = if (isMonomorphicType) Nil else { + // analogously to the "info" getter, here we allow for two completions: + // one: sourceCompleter to LazyType, two: LazyType to completed type + if (validTo == NoPeriod) + atPhase(phaseOf(infos.validFrom))(rawInfo load this) if (validTo == NoPeriod) atPhase(phaseOf(infos.validFrom))(rawInfo load this) |