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

enable strict-inference #149

Open
devoncarew opened this issue Sep 19, 2023 · 3 comments
Open

enable strict-inference #149

devoncarew opened this issue Sep 19, 2023 · 3 comments

Comments

@devoncarew
Copy link
Member

devoncarew commented Sep 19, 2023

Similar to #125, this is a proposal to enable strict-inference in the recommended lint set. We'd have to believe this is the way we want to recommend that people write Dart code.

See #151 for the related strict-raw-types flag.

@devoncarew
Copy link
Member Author

From a discussion with @leafpetersen, he considered this a clear win - adding it would provide value to users w/o any real downsides.

@devoncarew
Copy link
Member Author

For posterity, from https://dart.dev/tools/analysis#enabling-additional-type-checks:

Directs the type inference engine to never chooses the dynamic type when it can’t determine a static type.

final lines = {}; // Inference failure

@lrhn
Copy link
Member

lrhn commented Feb 7, 2024

This is a good stepping stone towards changing the instantiate-to-bounds to choosing Object?, and achieving "no implicit dynamic".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: More investigation needed
Development

No branches or pull requests

2 participants