Support negative start and end in ranges (#4249)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -1,3 +1,2 @@
|
||||
xs = [-5..5]
|
||||
xs = [int(-5)..5]
|
||||
assertEqual(xs[0], -5, 0.001, "first element is -5")
|
||||
assert(false)
|
||||
|
@ -101,7 +101,7 @@ gen_test!(property_of_object);
|
||||
gen_test!(index_of_array);
|
||||
gen_test!(comparisons);
|
||||
gen_test!(array_range_expr);
|
||||
gen_test_fail!(array_range_negative_expr, "syntax: Invalid integer: -5.0");
|
||||
gen_test!(array_range_negative_expr);
|
||||
gen_test_fail!(
|
||||
invalid_index_str,
|
||||
"semantic: Only integers >= 0 can be used as the index of an array, but you're using a string"
|
||||
|
Reference in New Issue
Block a user