File tree 2 files changed +4
-38
lines changed
compiler/src/dotty/tools/dotc/core
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 {
2598
2598
case _ => true
2599
2599
}
2600
2600
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; ... }`
2608
2604
*/
2609
2605
def reduceProjection (using Context ): Type =
2610
2606
if (isType) {
2611
2607
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
2617
2609
}
2618
2610
else this
2619
2611
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments