Fix compilation warnings.

This commit is contained in:
Benoit Marty 2023-05-23 11:56:08 +02:00
parent d6e60de4ec
commit a2f2cd28f9
3 changed files with 4 additions and 3 deletions

View file

@ -60,6 +60,7 @@ class StateMachine<Event : Any, State : Any>(
currentStateConfig?.onEnter?.invoke(nextState)
}
@Suppress("UNCHECKED_CAST")
private fun <E : Event> findMatchingRoute(event: E): StateMachineRoute<E, State, State>? {
val routesForEvent = routes.filter { it.eventType.isInstance(event) }