raz / conform / err / VariantConstMatch.raz

11 lines · 207 B · raw · history · last change 71a95b30

1module VariantConstMatch;
2type Shape = variant circle(r: INT); dot; end;
3const C: Shape = circle(1);
4proc main*;
5begin
6 match C of
7 | circle(r): r := 2;
8 | dot:
9 end;
10end;
11end VariantConstMatch.