Skip to content

Commit d248ce3

Browse files
authored
Merge pull request #545 from scala/backport-lts-3.3-23634
Backport "Fix scala#23576" to 3.3 LTS
2 parents e1fc36f + f2c45a8 commit d248ce3

File tree

1 file changed

+1
-1
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ object SpaceEngine {
663663
val refined = trace(i"refineUsingParent($tp, $sym1, $mixins)")(TypeOps.refineUsingParent(tp, sym1, mixins))
664664

665665
def containsUninhabitedField(tp: Type): Boolean =
666-
tp.fields.exists { field =>
666+
!tp.typeSymbol.is(ModuleClass) && tp.fields.exists { field =>
667667
!field.symbol.flags.is(Lazy) && field.info.dealias.isBottomType
668668
}
669669

0 commit comments

Comments
 (0)