@@ -80,11 +80,11 @@ private[internal] trait GlbLubs {
8080 var lubListDepth = 0
8181 // This catches some recursive situations which would otherwise
8282 // befuddle us, e.g. pos/hklub0.scala
83- def isHotForTs (xs : List [Type ]) = ts exists (_.typeParams == xs.map(_.typeSymbolDirect ))
83+ def isHotForTs (xs : List [Type ]) = ts exists (_.typeParams == xs.map(_.typeSymbol ))
8484
8585 def elimHigherOrderTypeParam (tp : Type ) = tp match {
8686 case TypeRef (_, _, args) if args.nonEmpty && isHotForTs(args) =>
87- logResult(s " Retracting dummies from $tp in lublist " )(tp.typeConstructor)
87+ logResult(" Retracting dummies from " + tp + " in lublist" )(tp.typeConstructor)
8888 case _ => tp
8989 }
9090 // pretypes is a tail-recursion-preserving accumulator.
@@ -101,7 +101,7 @@ private[internal] trait GlbLubs {
101101
102102 // Is the frontier made up of types with the same symbol?
103103 val isUniformFrontier = (ts0 : @ unchecked) match {
104- case t :: ts => ts forall (_.typeSymbolDirect == t.typeSymbolDirect )
104+ case t :: ts => ts forall (_.typeSymbol == t.typeSymbol )
105105 }
106106
107107 // Produce a single type for this frontier by merging the prefixes and arguments of those
@@ -112,11 +112,11 @@ private[internal] trait GlbLubs {
112112 if (isUniformFrontier) {
113113 val fbounds = findRecursiveBounds(ts0) map (_._2)
114114 val tcLubList = typeConstructorLubList(ts0)
115- def isRecursive (tp : Type ) = tp.typeSymbolDirect .typeParams exists fbounds.contains
115+ def isRecursive (tp : Type ) = tp.typeSymbol .typeParams exists fbounds.contains
116116
117117 val ts1 = ts0 map { t =>
118118 if (isRecursive(t)) {
119- tcLubList map (t baseType _.typeSymbolDirect ) find (t => ! isRecursive(t)) match {
119+ tcLubList map (t baseType _.typeSymbol ) find (t => ! isRecursive(t)) match {
120120 case Some (tp) => logResult(s " Breaking recursion in lublist, substituting weaker type. \n Was: $t\n Now " )(tp)
121121 case _ => t
122122 }
@@ -133,7 +133,7 @@ private[internal] trait GlbLubs {
133133 // frontier is not uniform yet, move it beyond the current minimal symbol;
134134 // lather, rinSe, repeat
135135 val sym = minSym(ts0)
136- val newtps = tsBts map (ts => if (ts.head.typeSymbolDirect == sym) ts.tail else ts)
136+ val newtps = tsBts map (ts => if (ts.head.typeSymbol == sym) ts.tail else ts)
137137 if (printLubs) {
138138 val str = (newtps.zipWithIndex map { case (tps, idx) =>
139139 tps.map(" " + _ + " \n " ).mkString(" (" + idx + " )\n " , " " , " \n " )
@@ -157,7 +157,9 @@ private[internal] trait GlbLubs {
157157
158158 /** The minimal symbol of a list of types (as determined by `Symbol.isLess`). */
159159 private def minSym (tps : List [Type ]): Symbol =
160- tps.iterator map (_.typeSymbolDirect) reduceLeft ((x, y) => if (x isLess y) x else y)
160+ (tps.head.typeSymbol /: tps.tail) {
161+ (sym1, tp2) => if (tp2.typeSymbol isLess sym1) tp2.typeSymbol else sym1
162+ }
161163
162164 /** A minimal type list which has a given list of types as its base type sequence */
163165 def spanningTypes (ts : List [Type ]): List [Type ] = ts match {
0 commit comments