Skip to content

Commit 72807fa

Browse files
committed
[patterns] Apply review comment to map soundness hole fix.
I missed the last comment on: #2687. Before I merged it. This fixes that.
1 parent 46684e0 commit 72807fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

accepted/future-releases/0546-patterns/feature-specification.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2806,10 +2806,9 @@ To match a pattern `p` against a value `v`:
28062806
28072807
4. Otherwise, for each (non-rest) entry in `p`, in source order:
28082808
2809-
1. Evaluate the key `expression` to `k` and call `containsKey(k)` on
2810-
the value. If this returns `false`, the map does not match.
2809+
1. Evaluate the key `expression` to `k`.
28112810
2812-
2. Otherwise, evaluate `v[k]` to `r`.
2811+
2. Evaluate `v[k]` to `r`.
28132812
28142813
3. If `r != null || (null is V) && v.containsKey(k)` evaluates to
28152814
`false` then the map does not match.

0 commit comments

Comments
 (0)