Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Add \exhaustive\ annotation to exhaustive match blocks#23

Merged
SeanTAllen merged 1 commit intomainfrom
sean/add-exhaustive-match-annotation
Mar 1, 2026
Merged

Add \exhaustive\ annotation to exhaustive match blocks#23
SeanTAllen merged 1 commit intomainfrom
sean/add-exhaustive-match-annotation

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

Ponyc recently added an \exhaustive\ annotation for match expressions. When present, the compiler will fail compilation if the match is not exhaustive. This protects against future breakage if new variants are added to a union type.

This adds \exhaustive\ to all match blocks that are currently exhaustive and do not have an else clause.

Ponyc recently added an \exhaustive\ annotation for match expressions.
When present, the compiler will fail compilation if the match is not
exhaustive. This protects against future breakage if new variants are
added to a union type.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 1, 2026
@SeanTAllen SeanTAllen merged commit 958c488 into main Mar 1, 2026
10 checks passed
@SeanTAllen SeanTAllen deleted the sean/add-exhaustive-match-annotation branch March 1, 2026 16:12
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants