Asserts in initializers
Closed this issue · 5 comments
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 @kwalrath is there any more to do on the docs/announce front? If not, let's close this.
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.
Yeah, aside from what Kathy said, I don't see any need to trumpet this feature from the heavens. It's pretty minor.
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)