raz / conform / err / ConstSliceToSlice.raz

16 lines · 272 B · raw · history · last change b5e76eab

1(* A []const T doesn't go where a []T is wanted, which could write
2 its elements (report sections 5.3 and 5.10). *)
3module ConstSliceToSlice;
4
5proc fill(s: []U8);
6begin
7 FILL(s, 0);
8end;
9
10proc main*;
11var r: []const U8;
12begin
13 fill(r);
14end;
15
16end ConstSliceToSlice.