diff options
author | Paul Phillips <paulp@improving.org> | 2011-07-02 18:26:48 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-07-02 18:26:48 +0000 |
commit | 4df206e6402f2e56bc450818acc14a707101c390 (patch) | |
tree | 1ea9a8147dfbc61015abd1697e429c148fd7802f | |
parent | dcc07bd9f0ce8c2f3ba1757047caa5919f4bc7c5 (diff) | |
download | scala-4df206e6402f2e56bc450818acc14a707101c390.tar.gz scala-4df206e6402f2e56bc450818acc14a707101c390.tar.bz2 scala-4df206e6402f2e56bc450818acc14a707101c390.zip |
Existentially quantified symbols, when read by ...
Existentially quantified symbols, when read by the unpickler, do not
have the existential flag set. This leads to failure. This patch seeks
improvement. Closes #4757, review by odersky.
-rw-r--r-- | src/compiler/scala/reflect/internal/pickling/UnPickler.scala | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/scala/reflect/internal/pickling/UnPickler.scala b/src/compiler/scala/reflect/internal/pickling/UnPickler.scala index 6c9ef4d545..f8ca0fb6de 100644 --- a/src/compiler/scala/reflect/internal/pickling/UnPickler.scala +++ b/src/compiler/scala/reflect/internal/pickling/UnPickler.scala @@ -369,8 +369,14 @@ abstract class UnPickler /*extends reflect.generic.UnPickler*/ { else NullaryMethodType(restpe) case EXISTENTIALtpe => - val restpe = readTypeRef() - ExistentialType(until(end, readSymbolRef), restpe) + val restpe = readTypeRef() + // @PP: Where is the flag setting supposed to happen? I infer + // from the lack of flag setting in the rest of the unpickler + // that it isn't right here. See #4757 for the immediate + // motivation to fix it. + val tparams = until(end, readSymbolRef) map (_ setFlag EXISTENTIAL) + ExistentialType(tparams, restpe) + case ANNOTATEDtpe => var typeRef = readNat() val selfsym = if (isSymbolRef(typeRef)) { |