This repository was archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
Don't report avoid_function_literals_in_foreach_calls
with null-aware call
#4039
Merged
Conversation
This file contains hidden or 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
…re call The current behavior is fully correct in null-safe mode, but in legacy mode the check for nullable type is inverted. Not adding a test because there is no legacy-mode test file. Closes #3354
The preferred method for testing, going forward, is to write a test class in |
Thanks. In any case, I am not taking up the task to add a completely new test focused on legacy mode. So if this is a blocker for this PR, it will remain unresolved. |
PTAL |
pq
approved these changes
Feb 27, 2023
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.
Thanks!
copybara-service bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Aug 23, 2023
…re call (dart-archive/linter#4039) * Don't report `avoid_function_literals_in_foreach_calls` with null-aware call The current behavior is fully correct in null-safe mode, but in legacy mode the check for nullable type is inverted. Not adding a test because there is no legacy-mode test file. Closes dart-lang/linter#3354 * Add test * Move test to noSoundNullSafety
copybara-service bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Aug 23, 2023
…dart-archive/linter#4330) Fixes dart-lang/linter#4328. Reverts dart-archive/linter#4039 that caused false negatives in non-null-safe mode. And reverts dart-archive/linter#2752 along with it because it was not the exact right fix in the first place. Null-aware calls are since handled by dart-archive/linter#4305 and all the existing tests still pass.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 current behavior is fully correct in null-safe mode, but in legacy mode the check for nullable type is inverted.
Not adding a test because there is no legacy-mode test file.
Closes dart-lang/sdk#58710