4 -- Uncomment this to turn typechecking code generation off:
5 -- -{stat: types.enabled=false}
7 function sum (x :: table(number)) :: number
8 local acc :: number = 0
10 acc = acc + x[i] -- .. 'x' -- converts to string
12 --acc='bug' -- put a string in a number variable
17 --x[23] = 'toto' -- string in a number list, sum() will complain
19 printf ("sum 1 .. %i = %i", #x, y)