Skip to content

Commit 1a70551

Browse files
authored
Patterns caching (#2494)
* [patterns] A handful of mostly small changes to patterns and records: - Clarify that patterns can call extension members. Fix #2457. - Non-boolean results throw in relational patterns. Fix #2461. - Maps and extractors are evaluated in source order. Fix #2466. - Specify non-exhaustive switch errors and warnings. Fix #2474. - Allow `final` before type annotated variables. Fix #2486. - Rename some grammars to align with Analyzer AST names. Fix #2491. * Add record types to the set of exhaustive types. * Remove outdated remark. * Fix bullet number. * Specify how invocations are cached when checking patterns. Fix #2107. * Apply review feedback.
1 parent a9ed2a3 commit 1a70551

File tree

2 files changed

+290
-51
lines changed

2 files changed

+290
-51
lines changed

accepted/future-releases/records/records-feature-specification.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,12 +503,12 @@ the same hash code.
503503
A record object has a primitive `==` operator if all of its field have primitive
504504
`==` operators.
505505

506-
*Note that this is a dynamic property of a record object, not a static property
507-
of its type. Since primitive equality only comes into play in constants, the
506+
*Note that this is a dynamic property of a record object, not a property of its
507+
static type. Since primitive equality only comes into play in constants, the
508508
compiler can see the actual field values for a relevant record at compile time
509509
because it has the actual constant record value with all of its constant fields.
510-
This means records can be used in constant sets and maps keys, but only when the
511-
records' fields could be as well.*
510+
This means a record can be used in a constant set or as a constant map key, but
511+
only when its field values could be as well.*
512512

513513
### Identity
514514

0 commit comments

Comments
 (0)