Assignments on edges crash on wrapping expressions
Consider the following example: ``` automaton def A(): event e; disc bool b; location: edge e do a1.b := true; end a1 : A(); ``` This crashes because `checkUniqueAsgn` does not handle wrapping expressions. One solution may be to unwrap the expression in `checkUniqueAsgn`. While this may lead to false positives, referencing variables outside the parent automaton isn't allowed anyway. However, that introduces a second problem: ``` automaton def A(): event e; disc bool b; location: edge e do a1.b := true; end a1 : A(); a2 : A(); ``` Here, automaton `a2` has an update that refences `a1.b`. The type checker will not pick up on this. I don't see an easy way to solve this. A second solution may be to type check unique (local) assignments during post checking. This will also be helpful for checking assignments on svgIn declarations. However, function scope checking also uses `checkUniqueAsgn`. I'd rather not move that check to postchecking as well.
issue

Copyright © Eclipse Foundation AISBL. All rights reserved.     Privacy Policy | Terms of Use | Copyright Agent