Skip to content

Commit

Permalink
Add rule to determine which extension types are always-exhaustive
Browse files Browse the repository at this point in the history
  • Loading branch information
eernstg committed Jan 17, 2024
1 parent c71b621 commit 0678479
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ information about the process, including in their change logs.
2024.01.17
- Specify that a type is 'incompatible with await', and use that to specify
a compile-time error at `await e;`.
- Specify which extension types are always-exhaustive.

2023.11.14
- Specify that a method declaration will shadow an otherwise "inherited"
Expand Down Expand Up @@ -828,6 +829,9 @@ type)*. Exhaustiveness analysis will treat such patterns as if they had
been an object pattern matching the extension type erasure of `V` (defined
below).

An extension type `V` is always-exhaustive if and only if its instantiated
representation type is always-exhaustive.

*In other words, we make no attempt to hide the representation type during
the exhaustiveness analysis. The usage of such patterns is very similar to
a cast into the extension type in the sense that it provides a reference of
Expand Down

0 comments on commit 0678479

Please sign in to comment.