Bug in guard with else
Summary
The syntax checker does not detect incorrect use of "else" guard and returns an exception when a state has a single next with an "else" in the guard of the transition.
Example Project
In attach 3 Avatar examples where the Else guard is used incorrectly. bug-guardElse-in-avatar.xml
What is the current bug behavior?
(What actually happens) In the first avatar design, it returns an exception 'NullPointerException'. For the second model, the syntax analysis is successful however there are two transitions with an "else" in guard. For the third model, the syntax analysis is successful however an element that has a single next with an "else" in the guard of the transition.
What is the expected correct behavior?
The syntax checker is expected to return an error for all 3 examples.
Possible fixes
I created a branch called "fix-avatar-guardElse" that solve this bug, where the "else" guard is allowed to be used at most once and only for states/operators that have more than one next element.