File tree 3 files changed +7
-0
lines changed
compiler/src/dotty/tools/dotc/transform
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ object SymUtils:
100
100
def whyNotGenericSum (declScope : Symbol )(using Context ): String =
101
101
if (! self.is(Sealed ))
102
102
s " it is not a sealed ${self.kindString}"
103
+ else if (! self.isOneOf(AbstractOrTrait ))
104
+ s " it is not an abstract class "
103
105
else {
104
106
val children = self.children
105
107
val companionMirror = self.useCompanionAsMirror
Original file line number Diff line number Diff line change @@ -846,6 +846,9 @@ class SpaceEngine(using Context) extends SpaceLogic {
846
846
847
847
if (! exhaustivityCheckable(sel)) return
848
848
849
+ debug.println(" checking " + _match.show)
850
+ debug.println(" selTyp = " + selTyp.show)
851
+
849
852
val patternSpace = Or (cases.foldLeft(List .empty[Space ]) { (acc, x) =>
850
853
val space = if (x.guard.isEmpty) project(x.pat) else Empty
851
854
debug.println(s " ${x.pat.show} ====> ${show(space)}" )
Original file line number Diff line number Diff line change
1
+ sealed class Foo [T ]
2
+ object Foo extends Foo [Nothing ]
You can’t perform that action at this time.
0 commit comments