-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Events triggered via sml::back::process<TEvent>()
are not processed in parent state
#562
Comments
sml::back::process<TEvent>()
are not processed in parent state
While events triggered via `process()` from a sub state are correctly handled in the parent state, events triggered via `back::process` are not. Also, the event triggered via `back::process` is not known to the parent machine, causing a compiler error: `no matching function for call to ‘get_id<int, e2>(...)`
I analyzed this issue a little bit and found that the event triggered via
A similar issue was resolved in #302 for To resolve that issue here in a similar fashion, one would need to access the root sm in For deferred events the story is different I think: they should be kept in state-local queues and be processed as soon as the state is left. |
While events triggered via `process()` from a sub state are correctly handled in the parent state, events triggered via `back::process` are not. Also, the event triggered via `back::process` is not known to the parent machine, causing a compiler error: `no matching function for call to ‘get_id<int, e2>(...)`
Expected Behavior
Events not handled in a child state should be handled by the parent state. Duplicate of #400.
Actual Behavior
While this works for events injected via
process_event()
from the top-level machine, it fails for events triggered by an action viasml::back::process<TEvent>()
: https://godbolt.org/z/dnMv1dfa4The text was updated successfully, but these errors were encountered: