-
Notifications
You must be signed in to change notification settings - Fork 1.7k
proposal: no constructor should give const suggestion? #57107
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
Comments
Moving over to the language repo for the language request. I think this has been asked and answered before ("const by default"), but someone here can point to the past response. |
Refer to dart-lang/language#1410. I don't know if it's the exact same case, but it has a related discussion explaining how some things work. |
The reason you don't get A constructor being If not, you could accidentally have a class that supports (I have no opinion on what lints should suggest here, but the default constructor you get if you write nothing is not a |
@lrhn I understand now why the constructor is not |
Ack. That's why I consider this an analyzer or linter issue, not a language issue. |
Thanks for the clarification 👍 |
I think it's a duplicate too, thanks for pointing out existing issues. |
moving from:
to
give me so many linter optimization suggestions:
I think no constructor should give me the same recommendation as a const constructor that does nothing. is there an actual difference?
The text was updated successfully, but these errors were encountered: