-
Notifications
You must be signed in to change notification settings - Fork 1.7k
In checked mode, void
should allow any value.
#28935
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
Punting to 1.24 per dart-leads discussion. |
Punting to 1.25, in agreement with Kasper: The spec part was moved to 1.25 and this meta issue awaits that. |
What about analyzer, guys? Now, it doesn't support this feature void foo() {
String s = "foo";
return s;
}
main() {
foo();
} In a nostrong mode it produces: dartanalyzer version 1.24.0-dev.4.2 |
The changes to the static analysis related to this issue is issue #28940, part of #28939, and it was landed last week. Here's the 1.24.0-dev.2.0 versus most recent commit behavior:
So the only reason why you don't see it yet is that it is still in the release pipeline. But there are no plans to allow the example that you gave: It is dynamically allowed to return any value from a void function, but only |
All done, closing. |
In checked mode,
void
should allow any value.void
should allow any value. #28936void
should allow any value. #28937void
should allow any value. #28938The text was updated successfully, but these errors were encountered: