File tree Expand file tree Collapse file tree 2 files changed +4
-38
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +4
-38
lines changed Original file line number Diff line number Diff line change @@ -2598,22 +2598,14 @@ object Types extends TypeUtils {
25982598 case _ => true
25992599 }
26002600
2601- /** Reduce a type ref P # X, where X is a type alias and P is a refined type or
2602- * a class type. If P is a refined type `T { X = U; ... }`, reduce P to U,
2603- * provided U does not refer with a RecThis to the same refined type. If P is a
2604- * class type, reduce it to the dealiasd version of P # X. This means that at typer
2605- * we create projections only for inner classes with class prefixes, since projections
2606- * of P # X where X is an abstract type are handled by skolemization. At later phases
2607- * these projections might arise, though.
2601+ /** Reduce a type-ref `T { X = U; ... } # X` to `U`
2602+ * provided `U` does not refer with a RecThis to the
2603+ * refinement type `T { X = U; ... }`
26082604 */
26092605 def reduceProjection (using Context ): Type =
26102606 if (isType) {
26112607 val reduced = prefix.lookupRefined(name)
2612- if reduced.exists then reduced
2613- else prefix.stripTypeVar match
2614- case pre : (AppliedType | TypeRef )
2615- if prefix.dealias.typeSymbol.isClass && this .symbol.isAliasType => dealias
2616- case _ => this
2608+ if reduced.exists then reduced else this
26172609 }
26182610 else this
26192611
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments