dart-sdk/sdk/lib/async
Paul Berry 45b02f8216 Use the new spec for Future flattening for type inference
Change Fasta type inference and Kernel type checking to use the new
definition for Future flattening, which is really unwrapping (peeling
off one layer of Future or FutureOr).  Use this for inferring types of
`await` expressions and return types from `async` functions.

Ensure that we are using the same notion of flattening for inference
and checking.  (Maybe it was a red flag that we weren't.)

This fixes await_test so that it produces a runtime error rather than
a compile time error - see #31541.

A similar change will need to be made to the analyzer - see #31887.

Change-Id: I7d936e9788969a48fdc216628eaa793389fb5e30
Reviewed-on: https://dart-review.googlesource.com/34504
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-01-15 07:09:36 +00:00
..
async.dart Change some constant declarations to lowerCase. 2017-11-14 12:59:14 +00:00
async_error.dart Strong mode fix for future_impl.dart. 2017-11-20 21:27:47 +00:00
async_sources.gni [infra] Translate _sources.gypi files to _sources.gni files 2017-08-14 21:54:36 -07:00
broadcast_stream_controller.dart Revert "Use relative URIs for core library part-of statements." 2017-07-07 11:18:24 -07:00
deferred_load.dart Revert "Use relative URIs for core library part-of statements." 2017-07-07 11:18:24 -07:00
future.dart Use the new spec for Future flattening for type inference 2018-01-15 07:09:36 +00:00
future_impl.dart Remove comment syntax from lib/async. 2017-11-17 20:40:47 +00:00
schedule_microtask.dart Change some constant declarations to lowerCase. 2017-11-14 12:59:14 +00:00
stream.dart Remove comment syntax from lib/async. 2017-11-17 20:40:47 +00:00
stream_controller.dart Remove comment syntax from lib/async. 2017-11-17 20:40:47 +00:00
stream_impl.dart Remove comment syntax from lib/async. 2017-11-17 20:40:47 +00:00
stream_pipe.dart Remove comment syntax from lib/async. 2017-11-17 20:40:47 +00:00
stream_transformers.dart Change some constant declarations to lowerCase. 2017-11-14 12:59:14 +00:00
timer.dart Change some constant declarations to lowerCase. 2017-11-14 12:59:14 +00:00
zone.dart Don't deprecate old constant names yet. 2017-11-17 10:58:33 +00:00