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

Updates to void. #28943

Closed
3 tasks done
floitschG opened this issue Mar 1, 2017 · 3 comments
Closed
3 tasks done

Updates to void. #28943

floitschG opened this issue Mar 1, 2017 · 3 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). closed-obsolete Closed as the reported issue is no longer relevant language-strong-mode-polish

Comments

@floitschG
Copy link
Contributor

floitschG commented Mar 1, 2017

void will be updated in the following way:

  • in checked mode, void accepts any value. The old behavior only allowed null. In checked mode, void should allow any value. #28935
  • an arrow function (declared with =>) is allowed to have expressions of any type if the return type is void. For example void foo() => x++;. void arrow functions should allow any rhs type #28939
  • void is allowed as a type argument to generics. The most common use cases are things like Future<void> or Visitor<void>. Statically and dynamically, in Dart 1, a generic void is treated similar to Object, except for functions, where the old behavior is maintained. In particular, a void-function is not assignable to an int-function (or any other non-void function). Allow "void" as a type argument #27504
@floitschG floitschG added the area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). label Mar 1, 2017
@floitschG floitschG added this to the 1.23 milestone Mar 1, 2017
@floitschG floitschG self-assigned this Mar 1, 2017
@mit-mit mit-mit added the area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). label Mar 2, 2017
@mit-mit
Copy link
Member

mit-mit commented Mar 15, 2017

Punting to 1.24 per dart-leads discussion.

@mit-mit mit-mit modified the milestones: 1.24, 1.23 Mar 15, 2017
@dgrove
Copy link
Contributor

dgrove commented May 5, 2017

@floitschG - all of the void changes look unlikely to land for 1.24, from what I see. Can these move to 1.25?

@terrylucas
Copy link
Contributor

@dgrove
Dan is this a feature we want post 1.24 Dartium?

@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). closed-obsolete Closed as the reported issue is no longer relevant language-strong-mode-polish
Projects
None yet
Development

No branches or pull requests

6 participants