Skip to content

Commit 608086f

Browse files
committed
Convert underlying -> superType elsewhere in front end
1 parent 2d1b896 commit 608086f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class CheckRealizable(using Context) {
132132
case tp: RefinedType => refinedNames(tp.parent) + tp.refinedName
133133
case tp: AndType => refinedNames(tp.tp1) ++ refinedNames(tp.tp2)
134134
case tp: OrType => refinedNames(tp.tp1) ++ refinedNames(tp.tp2)
135-
case tp: TypeProxy => refinedNames(tp.underlying)
135+
case tp: TypeProxy => refinedNames(tp.superType)
136136
case _ => Set.empty
137137
}
138138

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ trait PatternTypeConstrainer { self: TypeComparer =>
234234
def refinementIsInvariant(tp: Type): Boolean = tp match {
235235
case tp: SingletonType => true
236236
case tp: ClassInfo => tp.cls.is(Final) || tp.cls.is(Case)
237-
case tp: TypeProxy => refinementIsInvariant(tp.underlying)
237+
case tp: TypeProxy => refinementIsInvariant(tp.superType)
238238
case _ => false
239239
}
240240

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
15841584
case tp: RecType => fix(tp.parent).substRecThis(tp, anchor)
15851585
case tp @ RefinedType(parent, rname, rinfo) => tp.derivedRefinedType(fix(parent), rname, rinfo)
15861586
case tp: TypeParamRef => fixOrElse(bounds(tp).hi, tp)
1587-
case tp: TypeProxy => fixOrElse(tp.underlying, tp)
1587+
case tp: TypeProxy => fixOrElse(tp.superType, tp)
15881588
case tp: AndType => tp.derivedAndType(fix(tp.tp1), fix(tp.tp2))
15891589
case tp: OrType => tp.derivedOrType (fix(tp.tp1), fix(tp.tp2))
15901590
case tp => tp
@@ -1857,7 +1857,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
18571857
final def ensureStableSingleton(tp: Type): SingletonType = tp.stripTypeVar match {
18581858
case tp: SingletonType if tp.isStable => tp
18591859
case tp: ValueType => SkolemType(tp)
1860-
case tp: TypeProxy => ensureStableSingleton(tp.underlying)
1860+
case tp: TypeProxy => ensureStableSingleton(tp.superType)
18611861
case tp => assert(ctx.reporter.errorsReported); SkolemType(tp)
18621862
}
18631863

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ object TypeEval:
1818
// final val one = 1
1919
// type Two = one.type + one.type
2020
// ```
21-
case tp: TypeProxy if tp.underlying.isStable => tp.underlying.fixForEvaluation
21+
case tp: TypeProxy if tp.underlying.isStable => tp.underlying.fixForEvaluation // todo: should this be superType
2222
case tp => tp
2323

2424
def constValue(tp: Type): Option[Any] = tp.fixForEvaluation match

compiler/src/dotty/tools/dotc/interactive/Completion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ object Completion {
483483
val symbol = newSymbol(owner = NoSymbol, name, flags, info)
484484
val denot = SymDenotation(symbol, NoSymbol, name, flags, info)
485485
denot +: extractRefinements(parent)
486-
case tp: TypeProxy => extractRefinements(tp.underlying)
486+
case tp: TypeProxy => extractRefinements(tp.superType)
487487
case _ => List.empty
488488

489489
/** @param site The type to inspect.

0 commit comments

Comments
 (0)