Skip to content

Commit b66bcfe

Browse files
committed
Don't check prefix twice
This change also caches stability for the affected code path.
1 parent a24218a commit b66bcfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class CheckRealizable(implicit ctx: Context) {
7474
else {
7575
val r =
7676
if (!sym.isStable) NotStable
77-
else if (!isLateInitialized(sym)) realizability(tp.prefix)
77+
else if (!isLateInitialized(sym)) Realizable
7878
else if (!sym.isEffectivelyFinal) new NotFinal(sym)
7979
else realizability(tp.info).mapError(r => new ProblemInUnderlying(tp.info, r))
8080
val r1 = if (r == Realizable) {

0 commit comments

Comments
 (0)