diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-06-29 13:21:02 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-06-29 13:21:02 +0000 |
commit | 72a095dcdc84a988c61835d8115fd2738caa5127 (patch) | |
tree | 5f0bc76f4b89b780d30f64f99214d0422a445844 /src/compiler | |
parent | d7cc1621327e092edf59a394b10c106e4312957c (diff) | |
download | scala-72a095dcdc84a988c61835d8115fd2738caa5127.tar.gz scala-72a095dcdc84a988c61835d8115fd2738caa5127.tar.bz2 scala-72a095dcdc84a988c61835d8115fd2738caa5127.zip |
overeager optimisation caused timeout in neg/t3...
overeager optimisation caused timeout in neg/t3399. no review
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/reflect/internal/Types.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala index 543209e819..6300c8731a 100644 --- a/src/compiler/scala/reflect/internal/Types.scala +++ b/src/compiler/scala/reflect/internal/Types.scala @@ -5104,7 +5104,7 @@ A type's typeSymbol should never be inspected directly. // instead of wrapping it in a polytype, the current approach uses elimHOTparams to patch up this type so that // it looks more like a type ctor: Template[Container] with Container, but this is ill-kinded as Template[Container] is a proper type, whereas Container is not def elimHOTparams(ts: List[Type]) = ts map { - case tp@TypeRef(pre, sym, args) if args.nonEmpty && tsParams.contains(args.map(_.typeSymbolDirect)) => tp.typeConstructor + case tp@TypeRef(pre, sym, args) if args.nonEmpty && tsParams.contains(args.map(_.typeSymbol)) => tp.typeConstructor case tp => tp } @@ -5119,13 +5119,13 @@ A type's typeSymbol should never be inspected directly. // due to the invariant, that symbol is the current maximal symbol for which this holds, i.e., the one that conveys most information wrt subtyping // before merging, strip type arguments that refer to bound type params (when we're computing the lub of type constructors) // furthermore, the number of types to merge is reduced without losing information by dropping types that are a subtype of some other type - val sym0 = ts0.head.typeSymbolDirect - if (ts0.tail forall (_.typeSymbolDirect == sym0)){ + val sym0 = ts0.head.typeSymbol + if (ts0.tail forall (_.typeSymbol == sym0)){ mergePrefixAndArgs(elimSub(elimHOTparams(ts0), depth), 1, depth).toList ::: lubList(tsParams, tsBts map (_.tail), depth) } else { // frontier is not uniform yet, move it beyond the current minimal symbol; lather, rince, repeat val sym = minSym(ts0) - lubList(tsParams, tsBts map (ts => if (ts.head.typeSymbolDirect == sym) ts.tail else ts), depth) + lubList(tsParams, tsBts map (ts => if (ts.head.typeSymbol == sym) ts.tail else ts), depth) } } } |