Skip to content

Add \exhaustive\ annotation to exhaustive match blocks (#4901)#100

Merged
IgorDeepakM merged 1 commit intomasterfrom
old_pony_4901
Mar 2, 2026
Merged

Add \exhaustive\ annotation to exhaustive match blocks (#4901)#100
IgorDeepakM merged 1 commit intomasterfrom
old_pony_4901

Conversation

@IgorDeepakM
Copy link
Owner

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.

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.
@IgorDeepakM IgorDeepakM merged commit ccce460 into master Mar 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants