raz / test / err / MatchBlankVariant.raz

14 lines · 274 B · raw · history · last change 122c3f10

1module MatchBlankVariant;
2(* The arm for every other case of a variant is else, not _ *)
3type Arg = variant int(i: INT); real(r: F64; places: INT); end;
4
5proc f(a: Arg);
6begin
7 match a of
8 | int(i): return;
9 | _: return;
10 end;
11end;
12
13begin
14end MatchBlankVariant.