You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matching a unit tuple with a () pattern fails: match (): () => ... errors 'tuple pattern requires tuple subject'. §9.7.1.24 lists the unit-tuple pattern as a valid form.
Repro
fn main:
match ():
() => print("ok")
→ error: tuple pattern requires tuple subject
Found
Coverage sweep #518, 2026-07-03. The one-element (x,) form works (fixture spec_ss09_7_one_element_tuple_pattern landed); only the zero-element () form is unimplemented.
Fixed in 759667c. The unit pattern () was rejected because () is typed ty_void, not a zero-element tuple. Accepted it against a unit subject in check_pattern and in both MIR tuple-pattern lowerings (the Sema fix alone was insufficient — MIR lowering had the same rejection, caught by the behavior fixture). Verified: 'match (): () => print("ok")' now prints ok. Fixture: behav_match_unit_pattern. Full gate green.
Activity
test: coverage-sweep batch 1 (#495 #496 #521 #518 #529 #492 #499)
Sema/MIR: require bool conditions; accept the unit pattern (#654, #631)
ehartford commentedon Jul 14, 2026
Fixed in 759667c. The unit pattern () was rejected because () is typed ty_void, not a zero-element tuple. Accepted it against a unit subject in check_pattern and in both MIR tuple-pattern lowerings (the Sema fix alone was insufficient — MIR lowering had the same rejection, caught by the behavior fixture). Verified: 'match (): () => print("ok")' now prints ok. Fixture: behav_match_unit_pattern. Full gate green.