From 9437b3528cdc5a9ab30d456ad2dedf0e802503bc Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 12 Dec 2011 20:36:47 +0100 Subject: 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. --- src/compiler/scala/reflect/internal/Symbols.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/compiler/scala/reflect/internal/Symbols.scala') 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) -- cgit v1.2.3