Skip to content

fix: complete future with current value instead of null#21

Open
homeserve-lsaudon wants to merge 1 commit into
flutter-it:mainfrom
homeserve-lsaudon:fix/complete-future-with-current-value
Open

fix: complete future with current value instead of null#21
homeserve-lsaudon wants to merge 1 commit into
flutter-it:mainfrom
homeserve-lsaudon:fix/complete-future-with-current-value

Conversation

@homeserve-lsaudon

Copy link
Copy Markdown

A disposed command_it command completed its pending runAsync() future with null, crashing for non-nullable result types like Completer

Completing _futureCompleter with null fails for non-nullable
TResult. Use the current value (already typed as TResult) so the
completion is type-correct for every result type, nullable or not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant