We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1497796 commit 268ce37Copy full SHA for 268ce37
src/dotty/tools/dotc/core/Types.scala
@@ -89,9 +89,10 @@ object Types {
89
final def isValueType: Boolean = this.isInstanceOf[ValueType]
90
91
/** Does this type denote a stable reference (i.e. singleton type)? */
92
- final def isStable(implicit ctx: Context): Boolean = this match {
+ final def isStable(implicit ctx: Context): Boolean = stripTypeVar match {
93
case tp: TermRef => tp.termSymbol.isStable && tp.prefix.isStable
94
case _: SingletonType => true
95
+ case tp: RefinedType => tp.parent.isStable
96
case NoPrefix => true
97
case _ => false
98
}
0 commit comments