Skip to content
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

avoid_init_to_null fix of late initialize causes runtime errors #55941

Closed
jezell opened this issue Jun 5, 2024 · 1 comment
Closed

avoid_init_to_null fix of late initialize causes runtime errors #55941

jezell opened this issue Jun 5, 2024 · 1 comment
Assignees
Labels
analyzer-quick-fix area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@jezell
Copy link

jezell commented Jun 5, 2024

late Object? something = null;

avoid_init_to_null changes to

late Object? something;

Needs to change to:

Object? something;

Or code blows up at runtime after applying the fix.

@bwilkerson bwilkerson added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-quick-fix labels Jun 5, 2024
@jezell
Copy link
Author

jezell commented Jun 5, 2024

Sample here can repro locally, after applying fix crashes at runtime:

https://dartpad.dev/?id=be1beabcbd3837916621f4c78d474c9b

@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P2 A bug or feature request we're likely to work on labels Jun 7, 2024
@keertip keertip self-assigned this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-quick-fix area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants