aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/for_defer.elna
blob: 04f0404cdb8097210468beec8c8bb57cfc016613 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var
  array: [2]Int := [0, 0]

program()
begin
  for x of array do
    defer
      x^ := 1
    end
  end;
  assert(array = [1, 1])
return 0u8

end.