Skip to content

cast_nullable_to_non_nullable tests should include cast patterns #59062

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

Open
srawlins opened this issue Mar 9, 2023 · 0 comments
Open

cast_nullable_to_non_nullable tests should include cast patterns #59062

srawlins opened this issue Mar 9, 2023 · 0 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-linter Issues with the analyzer's support for the linter package linter-false-negative linter-new-language-feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@srawlins
Copy link
Member

srawlins commented Mar 9, 2023

Child issue of #58837

I think there should be a test case like:

(num?, Object) record = (1, "s");
var (i as int, s as String) = record;

in which the lint rule would report that the first destructured record field (which is nullable) should not be cast to a non-nullable type.

@pq pq added this to the Dart 3 beta 3 milestone Mar 13, 2023
@jcollins-g jcollins-g self-assigned this Mar 17, 2023
@pq pq added linter-false-negative linter-new-language-feature P2 A bug or feature request we're likely to work on labels Mar 20, 2023
@jcollins-g jcollins-g removed their assignment Mar 30, 2023
@pq pq removed this from the Dart 3 beta 3 milestone Apr 5, 2023
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Mar 29, 2024
@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 19, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 19, 2024
@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-linter Issues with the analyzer's support for the linter package linter-false-negative linter-new-language-feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants