this one lost me a few hours. I ran into it after a search&replace made without paying attention. See attached file for reproduction.
Assuming I don't have anything else defined. This line triggers an error as expected
#constant MYCONST := IDONTEXIST
but this one does not
#constant MYCONST := MYCONST
The value of MYCONST is then 0 if printed. There should at least be a warning, as we're assigning something that does not exist yet.
(it is half coherent with this one not triggering an error, assigning an empty value to a constant
#constant MYCONST :=