-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Null-assert the value given to a Completer expecting a non-null value #49053
Merged
Conversation
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
The code with out the null assertion is legal as per the type signature, but will throw a runtime exception if the nullable value is null. To make this exception more explicit, the value must be null-checked before completing the completer with the value. The analyzer will soon enforce such checks. See dart-lang/sdk#53253. This PR is behaviorally a no-op. Fixes flutter/flutter#136775
👋 |
🕺 |
goderbauer
approved these changes
Feb 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Feb 28, 2024
8acc96d405 Roll Dart SDK from 1e6b559fae88 to 44af84628b90 (1 revision) (flutter/engine#51035) 632f9d742d Roll Skia from 84c60d70fbbd to a673ab63fccc (1 revision) (flutter/engine#51034) 5c09604bd6 Null-assert the value given to a Completer expecting a non-null value (flutter/engine#49053) 055ede728c Roll Dart SDK from a0e3c16eea3e to 1e6b559fae88 (1 revision) (flutter/engine#51025) d6bca2a382 [Windows] Reduce log level of unsupported accessibility event message (flutter/engine#51024) 8fa1141b46 Roll Skia from c8703c91675e to 84c60d70fbbd (4 revisions) (flutter/engine#51021)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code with out the null assertion is legal as per the type signature, but will throw a runtime exception if the nullable value is null. To make this exception more explicit, the value must be null-checked before completing the completer with the value.
The analyzer will soon enforce such checks. See dart-lang/sdk#53253.
This PR is behaviorally a no-op.
Fixes flutter/flutter#136775
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.