Skip to content
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

Fix tryEvent() by never tryState(.AnyState) #29

Merged
merged 2 commits into from
Jul 7, 2015

Conversation

inamiy
Copy link
Member

@inamiy inamiy commented Jul 7, 2015

This pull request will fix tryEvent() where toState (finished state) might become as .AnyState.

This fix will also allow #28 to trigger event without changing StateMachine's internal state, i.e.:

machine.addRouteEvent(.SomeEvent, transitions: [nil => nil], handler: {...})
machine <-! .SomeEvent  // handler should be called from any states, and should not change state

@inamiy inamiy added the bug label Jul 7, 2015
@inamiy inamiy self-assigned this Jul 7, 2015
inamiy added a commit that referenced this pull request Jul 7, 2015
Fix tryEvent() by never tryState(.AnyState)
@inamiy inamiy merged commit 5834968 into swift/2.0 Jul 7, 2015
@inamiy inamiy deleted the fix/event-without-transition branch July 7, 2015 02:50
@inamiy inamiy added this to the 3.0.0 milestone Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant