-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
invalidThis doesn't seem rightThis doesn't seem right
Description
Example code
routine main() is
var x : array[5] integer;
x[-1] := -1;
x[0] := 0;
x[6] := 6;
println x[-1];
println x[0];
println x[6];
return;
endExpected behavor
Runtime errors as we access invalid indexes (btw, C+ arrays are 1-indexed)
Actual behavior
Prints -1, 0, 6
Although seems cool, it shouldn't be like this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem right