Using Substance variables not declared in Style header
liangyiliang opened this issue · comments
Describe the bug
For references to back-ticked variables `x`
in Style block body, the compiler doesn't check whether or not x
really exists as a Substace variable, nor does it check that `x`
is declared in the Style block header.
To Reproduce
https://penrose.cs.cmu.edu/try/?gist=55abb34c7d501de0c03ac70d94bc71ed
Expected behavior
There should be a compiler error since not_in_header
has not been declared in the Style block header. Furthermore, not_in_header
is not even a Substance variable.
IMO the behavior should be: the body of a Style block can only access Substance variables through the Style header.
So, `abc`.xyz
should only be allowed in Style block body if `abc`
(as a Substance variable) is somehow declared in the Style header.