diff options
author | Martin Odersky <odersky@gmail.com> | 2010-03-01 10:59:46 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-03-01 10:59:46 +0000 |
commit | 7214dc0e235f363bbc42efac255fc11cc77fdaf4 (patch) | |
tree | 5a94452a5d63f785e30a3bf94b7e49b46fdc37f5 | |
parent | 42e67f14202858d42b462bb00831fac3ba6854fa (diff) | |
download | scala-7214dc0e235f363bbc42efac255fc11cc77fdaf4.tar.gz scala-7214dc0e235f363bbc42efac255fc11cc77fdaf4.tar.bz2 scala-7214dc0e235f363bbc42efac255fc11cc77fdaf4.zip |
Added one previously overlooked case for comput...
Added one previously overlooked case for computing the right tparams of
glbs of polytypes. This is a postscript to the fix of #3082.
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index d4281c169e..10bebc40f8 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -4900,10 +4900,9 @@ A type's typeSymbol should never be inspected directly. case List() => AnyClass.tpe case List(t) => t case ts @ PolyType(tparams, _) :: _ => - PolyType( - (tparams, matchingBounds(ts, tparams).transpose).zipped map - ((tparam, bounds) => tparam.cloneSymbol.setInfo(lub(bounds, depth))), - glb0(matchingInstTypes(ts, tparams))) + val tparams1 = (tparams, matchingBounds(ts, tparams).transpose).zipped map + ((tparam, bounds) => tparam.cloneSymbol.setInfo(lub(bounds, depth))) + PolyType(tparams1, glb0(matchingInstTypes(ts, tparams1))) case ts @ MethodType(params, _) :: rest => MethodType(params, glb0(matchingRestypes(ts, params map (_.tpe)))) case ts @ TypeBounds(_, _) :: rest => |