-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Option: force types (with warnings/errors) #451
Labels
closed-not-planned
Closed as we don't intend to take action on the reported issue
Comments
This comment was originally written by drfibonacci@google.com Added Area-Dartboard, Triaged labels. |
At some point, we would like to create a next-generation Dartboard. In the meantime, dartboard has been deprecated. Added WontFix label. |
kevmoo
added
closed-not-planned
Closed as we don't intend to take action on the reported issue
and removed
resolution-wont_fix
labels
Mar 1, 2016
This was referenced Oct 29, 2020
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue was originally filed by ole...@gmail.com
Optional types is a great idea, but for those of us who want to use types everywhere it would be nice to have an option to let Dart ensure that they really are used everywhere.
It is easy to forget adding a type somewhere. In that case I may think the program is type-correct (no warnings or errors in checked mode), because I thought I added types to everything, but it really isn't.
As it is now, if you forget a type somewhere even with "Checked mode" activated on the Dartboard there are no warnings about missing types.
Concrete example:
main(){}
int someFunc(var strX)
{
int y = strX - 1;
return y;
}
If I choose to have Dart force types (either through warnings or errors as in checked mode), Dart should warn me there is no type on strX. I would then add a type on strX (String) and get the type warning/error on the subtraction operation.
The text was updated successfully, but these errors were encountered: