feat: expand nominal inline match arms

This commit is contained in:
2026-10-28 12:39:28 +01:00
parent dc7b2e40e2
commit 5cf9e15661
13 changed files with 908 additions and 49 deletions
+4
View File
@@ -88,6 +88,8 @@ Code :: enum {
non_exhaustive_match
unreachable_match_arm
invalid_match_capture
invalid_inline_match_subject
invalid_inline_match_capture
inactive_union_field
invalid_pointer_type
invalid_address_operand
@@ -226,6 +228,8 @@ messages :: $enummap.init(Code, []u8, {
non_exhaustive_match = "match is not exhaustive",
unreachable_match_arm = "match arm is unreachable",
invalid_match_capture = "payload capture requires compatible nonvoid tagged union variants",
invalid_inline_match_subject = "inline match arm requires an enum or tagged union",
invalid_inline_match_capture = "inline match arm requires one enum capture or one payload capture and an optional tag",
inactive_union_field = "tagged union field is not active",
invalid_pointer_type = "pointer requires a supported concrete pointee type",
invalid_address_operand = "address-of requires addressable storage",