Skip to content

Commit c8efe69

Browse files
committed
Align tests in TypeComparer and AsSeenFrom
1 parent 2ac2315 commit c8efe69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,13 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
284284
given Context = ctx // optimization for performance
285285
val info2 = tp2.info
286286

287-
/** Does `tp2` have a singleton type or NoPrefix as a prefix?
287+
/** Does `tp2` have a stable prefix or NoPrefix as a prefix?
288288
* If that's not the case, following an alias via asSeenFrom could be lossy
289289
* so we should not conclude `false` if comparing aliases fails.
290290
* See pos/i17064.scala for a test case
291291
*/
292292
def hasPrecisePrefix(tp: NamedType) =
293-
tp.prefix.isSingleton || tp.prefix == NoPrefix
293+
tp.prefix.isStable || tp.prefix == NoPrefix
294294

295295
info2 match
296296
case info2: TypeAlias =>

0 commit comments

Comments
 (0)