File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ class TypeApplications(val self: Type) extends AnyVal {
295
295
* no type field named `p` in this type, or `p` is a named type parameter of this type.
296
296
* The first case is important for the recursive case of AndTypes, because some of their operands might
297
297
* be missing the named parameter altogether, but the AndType as a whole can still
298
- * contain it.
298
+ * contain it.
299
299
*/
300
300
final def widenToNamedTypeParams (params : Set [TypeSymbol ])(implicit ctx : Context ): Type = {
301
301
@@ -311,10 +311,11 @@ class TypeApplications(val self: Type) extends AnyVal {
311
311
312
312
/** Widen type by forming the intersection of its widened parents */
313
313
def widenToParents (tp : Type ) = {
314
- val parents = tp.parents.map(p => tp.baseTypeWithArgs(p.symbol))
315
- ctx.typeComparer.glb(parents.map(_.widenToNamedTypeParams(params)))
314
+ val parents = tp.parents.map(p =>
315
+ tp.baseTypeWithArgs(p.symbol).widenToNamedTypeParams(params))
316
+ parents.reduceLeft(ctx.typeComparer.andType(_, _))
316
317
}
317
-
318
+
318
319
if (isOK(self)) self
319
320
else self match {
320
321
case self @ AppliedType (tycon, args) if ! isOK(tycon) =>
You can’t perform that action at this time.
0 commit comments