Closed issa-tseng closed 6 years ago
This is actually somewhat tricky, due to the way we use case construction as the way to build matchers. So all we can do is trap misuse at match-time and error.
Punting on this until a clearer answer emerges. Making case superclasses abstract is a fairly obvious and correct thing to do, but if doing so breaks the way we do case handling in general then we need to do more thinking.
This is done; we still allow the construction of such cases, sadly, but we will never allow matching on them, which should discourage their use in this way.
And then change their
unapply
to just return the original case likeotherwise
does.