diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-12-12 00:15:48 +0100 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-12-12 22:10:00 +0100 |
commit | 24455e22d56c8447fdf6089ad612f6ce75020f0b (patch) | |
tree | 5e6451fff2905d9ced0abd061b967d0326ccc7b1 /src | |
parent | 7fe7d2537963dd24ea1cca7b0c4b96f96b773c4a (diff) | |
download | scala-24455e22d56c8447fdf6089ad612f6ce75020f0b.tar.gz scala-24455e22d56c8447fdf6089ad612f6ce75020f0b.tar.bz2 scala-24455e22d56c8447fdf6089ad612f6ce75020f0b.zip |
Recurse into instantiations when stripping type vars.
This led to the inference of weird types as list
of lub base types was empty.
This change fixes case x3 in the test case.
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/internal/Types.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index d82692000d..119a57d268 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -6605,11 +6605,11 @@ trait Types extends api.Types { self: SymbolTable => case ExistentialType(qs, _) => qs case t => List() } - def stripType(tp: Type) = tp match { + def stripType(tp: Type): Type = tp match { case ExistentialType(_, res) => res case tv@TypeVar(_, constr) => - if (tv.instValid) constr.inst + if (tv.instValid) stripType(constr.inst) else if (tv.untouchable) tv else abort("trying to do lub/glb of typevar "+tp) case t => t |