|author||Kevin Millikin <firstname.lastname@example.org>||Tue Sep 04 16:50:51 2018 +0000|
|email@example.com <firstname.lastname@example.org>||Tue Sep 04 16:50:51 2018 +0000|
Signal errors and warnings for invalid returns Implement the feature spec for checking returns against inferred function return types: https://github.com/dart-lang/sdk/blob/master/docs/language/informal/invalid_returns.md with the change that an invalid return without a subexpression is a warning, not an error. This is because it is a warning in the analyzer and it would be a breaking change to turn it into an error. The check for valid returns is moved to exactly where we handle returns, rather than in ensureAssignable which is used as a helper in a lot of places. A bug in type inference was fixed: we would use `void` for the type of return without a subexpression instead of `null`. To accommodate that we would use a non-standard subtyping relation for returns. This could lead to us inferring a return type of `void` in cases where we should not. Change-Id: Iee9ece9c722f47efa305f49490d3022d0bbb9f44 Reviewed-on: https://dart-review.googlesource.com/72403 Commit-Queue: Kevin Millikin <email@example.com> Reviewed-by: Aske Simon Christensen <firstname.lastname@example.org>
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
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.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.