-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix src/lib/support/StateMachine pattern matching (#13664)
The Enter method can rewrite the state objects during pattern matching traversal. We need a one-shot bool to ensure we only execute Enter once. And although state changes from Exit, LogTransition and GetName aren't expected, we should check in these too. In all cases, the pattern match should only execute once. This commit adds the necessary check and a test case to verify this is working correctly.
- Loading branch information
1 parent
e3aa71b
commit bb9ac68
Showing
2 changed files
with
77 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters