9f9987f709ef0370367803859572b7fa6d2b844c
void foo() { return 42; }
The language team several times agreed to make it an error when a non-void expression `e` is used in `return e;` in the body of a function whose return type is `void`. When `void` is changed from a near-bottom type to a top type, the wording in the language specification (dartLangSpec.tex) does _not_ ensure that this is an error, because all types are assignable to `void`, so we need a specific rule saying that it is an error. This CL adds such a rule to the feature spec for generalized void. It also adds a rule that makes it an error to have return type `void` in a function marked `async*` or `sync*`, based on the reasoning that they "are returning a Future/Stream/Iterable semantically", and it would now be an error if they did that explicitly. Change-Id: I22fed9e9fc6097bb50100a151b964045e41ef173 Reviewed-on: https://dart-review.googlesource.com/35680 Reviewed-by: Leaf Petersen <leafp@google.com> Commit-Queue: Erik Ernst <eernst@google.com>
…
…
…
…
…
Dart
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Using Dart
Visit the dartlang.org to learn more about the language, tools, getting started, and more.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
Building Dart
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
Contributing to Dart
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
License & patents
Description
Languages
Dart
84.6%
C++
13%
Python
0.7%
JavaScript
0.5%
HTML
0.4%
Other
0.5%