Skip to content

Commit 0eea5b3

Browse files
committed
Clean up with andAlso combinator
1 parent b66bcfe commit 0eea5b3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,10 @@ class CheckRealizable(implicit ctx: Context) {
7777
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))
80-
val r1 = if (r == Realizable) {
80+
r andAlso {
8181
sym.setFlag(Stable)
8282
realizability(tp.prefix)
83-
} else r
84-
r1
83+
}
8584
}
8685
case _: SingletonType | NoPrefix =>
8786
Realizable

0 commit comments

Comments
 (0)