Steps to Reproduce:
Run Check Syntax on:
timestamp[a]
Actual Results:
A check mark
Expected Results:
An error saying that a is unbound.
Discussion:
Unless there is a short-circuiting, most programming languages will evaluate a syntax object by evaluating all subsyntax first. This means: for <a>[<i>], instead of:
- a-val = eval(<a>)
- error if a-val is not an array
- i-val = eval(<i>)
- return a-val[i-val]
It should be done in this order instead:
- a-val = eval(<a>)
- i-val = eval(<i>)
- error if a-val is not an array
- return a-val[i-val]
By the way, Check Syntax (or, well-formedness checking) by running the filter with short-circuit disabled is very brittle. I hope to devise an algorithm soon to replace the current checking.