KCL: Refactor array-indexing code (#4173)

Neater code, and better error messages.
This commit is contained in:
Adam Chalmers
2024-10-17 16:29:27 -07:00
committed by GitHub
parent ef0ae5e06e
commit 0706624381
2 changed files with 105 additions and 87 deletions

View File

@ -108,7 +108,7 @@ gen_test_fail!(
);
gen_test_fail!(
invalid_index_negative,
"semantic: i's value is not a valid property/index, you can only use a string or int (>= 0) here"
"semantic: '-1' is not a valid index, indices must be whole positive numbers"
);
gen_test_fail!(
invalid_index_fractional,