You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [patterns] Fix sign of a remark on non-refutable patterns
* [patterns] Try to clarify remark on non-"refutable" patterns that fail
I found I had to reread this paragraph a couple of times to understand
the point it was making. (Possibly the logic error just fixed in it
can be taken as evidence that other readers found it a bit hard to
read, too.) So here's an attempt at making it clearer.
* [patterns] Deduplicate assignable-to-bool requirement on guard expressions
* [patterns] Slightly unpack logic for list length-checking
I found the preface "If `p` is empty or has any non-rest elements",
and its relationship with the sub-cases it encloses, required some
re-reading to put together. It's meant as a way of saying "If `p` is
not `[...]`", as referred to in the rationale line that follows it;
but to see that, one has to work through a bit of Boolean logic to
invert the condition.
So here's a rewording which I hope is clearer, by un-inverting the
condition.
The usage "then do nothing for checking the length" is perhaps a bit
unconventional in spec-ese. But it's parallel to the "then do nothing
for checking this element" found in the head and tail cases below.
* [patterns] Slightly unpack logic for map length-checking
Much like for lists in the previous commit.
* [patterns] Fix spec-variable references in field subpattern caching
There's no `e` defined here, but there is an `f`. Based on the
object case just below, I think the name `f` ("field") was the
intended one.
Also cut a conflicting definition of `f`.
0 commit comments