File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ object SymUtils:
100100 def whyNotGenericSum (declScope : Symbol )(using Context ): String =
101101 if (! self.is(Sealed ))
102102 s " it is not a sealed ${self.kindString}"
103+ else if (! self.isOneOf(AbstractOrTrait ))
104+ s " it is not an abstract class "
103105 else {
104106 val children = self.children
105107 val companionMirror = self.useCompanionAsMirror
Original file line number Diff line number Diff line change @@ -846,6 +846,9 @@ class SpaceEngine(using Context) extends SpaceLogic {
846846
847847 if (! exhaustivityCheckable(sel)) return
848848
849+ debug.println(" checking " + _match.show)
850+ debug.println(" selTyp = " + selTyp.show)
851+
849852 val patternSpace = Or (cases.foldLeft(List .empty[Space ]) { (acc, x) =>
850853 val space = if (x.guard.isEmpty) project(x.pat) else Empty
851854 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