Skip to content

Commit f583b70

Browse files
committed
revert previous approach
1 parent 192c959 commit f583b70

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

compiler/src/dotty/tools/dotc/core/TypeOps.scala

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -748,22 +748,7 @@ object TypeOps:
748748
//
749749
if (child.name == tpnme.LOCAL_CHILD) return child.typeRef
750750

751-
val childTp = {
752-
val parentSym = parent.typeSymbol
753-
val parentPre = parent.normalizedPrefix
754-
val defaultRef = if (child.isTerm) child.termRef else child.typeRef
755-
756-
if (parentSym.isClass && parentPre.isInstanceOf[TermRef]) {
757-
val newPrefix = childPrefix(parentPre, parentSym, child)
758-
if (newPrefix.exists)
759-
if (child.isTerm) TermRef(newPrefix, child.asTerm)
760-
else TypeRef(newPrefix, child.asType)
761-
else
762-
defaultRef
763-
}
764-
else
765-
defaultRef
766-
}
751+
val childTp = if (child.isTerm) child.termRef else child.typeRef
767752

768753
inContext(ctx.fresh.setExploreTyperState().setFreshGADTBounds.addMode(Mode.GadtConstraintInference)) {
769754
instantiateToSubType(childTp, parent, mixins).dealias

0 commit comments

Comments
 (0)