b244c0805d
declared return type of an async function is a super type of Future<T> for any T. In case the check is not successful an error message is produced. The location of the name of the offending function declaration is used as location information for message. Ideally we would use the location of the type, so until types get annotated with location information the error message remains suboptimal. This closes #33425 and closes #34057. Thanks to dmitryas and jensj for their helpful guidance. Bug: dartbug.com/33425 dartbug.com/34057 Change-Id: I3b3dadc25b574422ea1f38671fe8cba3ffdd494c Reviewed-on: https://dart-review.googlesource.com/69307 Commit-Queue: Daniel Hillerström <hillerstrom@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>