Skip to content

Commit 6bf171f

Browse files
committed
Some polishings
1 parent 82a1721 commit 6bf171f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ object CheckRealizable {
2121

2222
object NotConcrete extends Realizability(" is not a concrete type")
2323

24-
object NotStable extends Realizability(" is not a stable reference")
25-
2624
class NotFinal(sym: Symbol)(implicit ctx: Context)
2725
extends Realizability(i" refers to nonfinal $sym")
2826

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,10 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
406406
if (cls2 eq AnyKindClass) return true
407407
if (tp1.isRef(NothingClass)) return true
408408
if (tp1.isLambdaSub) return false
409-
if (cls2 eq AnyClass) return true
410409
// Note: We would like to replace this by `if (tp1.hasHigherKind)`
411410
// but right now we cannot since some parts of the standard library rely on the
412411
// idiom that e.g. `List <: Any`. We have to bootstrap without scalac first.
412+
if (cls2 eq AnyClass) return true
413413
if (cls2 == defn.SingletonClass && tp1.isStable) return true
414414
return tryBaseType(cls2)
415415
}

0 commit comments

Comments
 (0)