We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78f9951 commit c9a019cCopy full SHA for c9a019c
compiler/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -2480,7 +2480,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2480
sym.isAllOf(EnumCase, butNot=JavaDefined)
2481
2482
def isEnumValueOrModule(ref: TermRef): Boolean =
2483
- isEnumValue(ref) || ref.termSymbol.is(Module)
+ isEnumValue(ref) || ref.termSymbol.is(Module) || (ref.info match {
2484
+ case tp: TermRef => isEnumValueOrModule(tp)
2485
+ case _ => false
2486
+ })
2487
2488
/** Can we enumerate all instantiations of this type? */
2489
def isClosedSum(tp: Symbol): Boolean =
0 commit comments