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
The language team decided that map pattern matching should be 'loose' rather than 'strict', in the sense that there is no support for the rest element in a map pattern (such as the ... in {"key1": value1, ...}), and map pattern matching will allow key/value pairs to exist even though they are not matched (that is, {"key1": value1} now works in the same way as {"key1": value1, ...} used to work).
The co19 tests need to be updated correspondingly: Map patterns with ... should be a compile-time error, and existing tests using map patterns with ... should be updated to not have that, and they should expect the same behavior as they did before this change (with ... and with the old semantics). Tests about map patterns where ... did not occur should behave the same if a when clause is added where the length is tested. And tests about map patterns where ... did not occur should no longer use length to verify that there are no non-matched key-value pairs (they may still call length in order to verify that there are enough key/value pairs to satisfy the given set of field patterns).
The text was updated successfully, but these errors were encountered:
The language team decided that map pattern matching should be 'loose' rather than 'strict', in the sense that there is no support for the rest element in a map pattern (such as the
...
in{"key1": value1, ...}
), and map pattern matching will allow key/value pairs to exist even though they are not matched (that is,{"key1": value1}
now works in the same way as{"key1": value1, ...}
used to work).The co19 tests need to be updated correspondingly: Map patterns with
...
should be a compile-time error, and existing tests using map patterns with...
should be updated to not have that, and they should expect the same behavior as they did before this change (with...
and with the old semantics). Tests about map patterns where...
did not occur should behave the same if awhen
clause is added where the length is tested. And tests about map patterns where...
did not occur should no longer uselength
to verify that there are no non-matched key-value pairs (they may still calllength
in order to verify that there are enough key/value pairs to satisfy the given set of field patterns).The text was updated successfully, but these errors were encountered: