Skip to content

Commit 0c18756

Browse files
committed
Clean up logic for isStable
1 parent b3dd07c commit 0c18756

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: compiler/src/dotty/tools/dotc/core/SymDenotations.scala

+4-2
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,10 @@ object SymDenotations {
606606
)
607607

608608
/** Is this a denotation of a stable term (or an arbitrary type)? */
609-
final def isStable(implicit ctx: Context): Boolean =
610-
isType || is(StableOrErased) || !is(UnstableValue) && !info.isInstanceOf[ExprType]
609+
final def isStable(implicit ctx: Context): Boolean = {
610+
def isUnstableValue = is(UnstableValue) || info.isInstanceOf[ExprType]
611+
isType || is(Stable) || !isUnstableValue
612+
}
611613

612614
/** Is this a denotation of a class that does not have - either direct or inherited -
613615
* initaliazion code?

0 commit comments

Comments
 (0)