Re: case null vs null pattern

2022-04-16 Thread Brian Goetz
This is correct; I agree this is “not quite where we want to be yet”, but the path to get there is not obvious, which is why we haven’t proposed anything more than we have. At some level (though this isn’t the whole story), the “null pattern” is in the same limbo as constant patterns. Consta

case null vs null pattern

2022-04-16 Thread Remi Forax
Hi all, i maybe wrong but it seems that the spec consider null as a kind of case instead of as a kind of pattern, which disables the refactoring that should be possible with the introduction of the record pattern. Let suppose i have a sealed type with only one implementation declared like this