Skip to content

Asserts in initializers #30968

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

Closed
6 of 7 tasks
munificent opened this issue Oct 3, 2017 · 5 comments
Closed
6 of 7 tasks

Asserts in initializers #30968

munificent opened this issue Oct 3, 2017 · 5 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, ...).
Milestone

Comments

@munificent
Copy link
Member

munificent commented Oct 3, 2017

Flutter likes it, so the language team considers the experiment a success and will ship asserts in constructor initialization lists in Dart 2.0.

Work remaining to be done:

@munificent munificent added 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, ...). labels Oct 3, 2017
@munificent munificent added this to the 2.0 milestone Oct 3, 2017
@munificent munificent self-assigned this Oct 3, 2017
@dgrove
Copy link
Contributor

dgrove commented May 10, 2018

@munificent @kwalrath is there any more to do on the docs/announce front? If not, let's close this.

@kwalrath
Copy link
Contributor

The language tour should cover asserts in initializers (and probably have more initializer coverage, in general). I've added this to dart-lang/site-www#507.

@munificent
Copy link
Member Author

Yeah, aside from what Kathy said, I don't see any need to trumpet this feature from the heavens. It's pretty minor.

@rkj
Copy link

rkj commented Sep 14, 2018

Any documentation? I just tried to use it, but cannot use foreach in the assert body, which makes it less usable than I would like (I wanted to verify that a map passed to the constructor doesn't have null values)

@munificent
Copy link
Member Author

No doc that I know of. The spec changes landed here 609d26a, a72f46d.

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, ...).
Projects
None yet
Development

No branches or pull requests

4 participants