dart-sdk/sdk/lib
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
..
_chrome/dart2js Fixed analyzer test to use dart2js not dartium 2017-09-01 09:03:16 -07:00
_http Reapply "Misc "strong" mode fixes for dart:io." 2017-12-19 21:41:47 +00:00
_internal Print names for generic method type parameters in function type 2018-01-10 21:00:48 +00:00
async Use the new spec for Future flattening for type inference 2018-01-15 07:09:36 +00:00
collection Remove most comment syntax casts from sdk. 2017-11-21 21:08:26 +00:00
convert Fix return type of Base64Codec.decode to say Uint8List. 2018-01-08 13:27:02 +00:00
core Initial steps to add cast operation. 2018-01-03 12:16:24 +00:00
developer Documentation updates for dart:developer. 2018-01-10 17:24:09 +00:00
html Updated PYTHON code to correctly generate web_sql and re-wrote/re-enabled async web_sql test. 2017-12-29 23:51:02 +00:00
indexed_db/dart2js Remove generic method comment syntax from dart:html. 2017-12-06 21:26:04 +00:00
internal Initial steps to add cast operation. 2018-01-03 12:16:24 +00:00
io Reapply "Partial static mode changes for vm-service and tests (part 3)." 2018-01-11 01:31:17 +00:00
isolate Fix return type of Base64Codec.decode to say Uint8List. 2018-01-08 13:27:02 +00:00
js/dart2js Remove generic method comment syntax from dart:html. 2017-12-06 21:26:04 +00:00
js_util/dart2js Fixed analyzer test to use dart2js not dartium 2017-09-01 09:03:16 -07:00
math Remove most comment syntax casts from sdk. 2017-11-21 21:08:26 +00:00
mirrors [infra] Translate _sources.gypi files to _sources.gni files 2017-08-14 21:54:36 -07:00
profiler [infra] Translate _sources.gypi files to _sources.gni files 2017-08-14 21:54:36 -07:00
svg/dart2js Fixed analyzer test to use dart2js not dartium 2017-09-01 09:03:16 -07:00
typed_data Don't deprecate old constant names yet. 2017-11-17 10:58:33 +00:00
vmservice Partial static mode changes for vm-service and tests (part 4). 2018-01-12 20:12:41 +00:00
web_audio/dart2js Fixed analyzer test to use dart2js not dartium 2017-09-01 09:03:16 -07:00
web_gl/dart2js Fixed analyzer test to use dart2js not dartium 2017-09-01 09:03:16 -07:00
web_sql/dart2js Updated PYTHON code to correctly generate web_sql and re-wrote/re-enabled async web_sql test. 2017-12-29 23:51:02 +00:00
dart_client.platform Reland: [dart:io] Moves Http code into a separate library. 2017-09-21 19:21:25 +00:00
dart_server.platform Reland: [dart:io] Moves Http code into a separate library. 2017-09-21 19:21:25 +00:00
dart_shared.platform Reland: [dart:io] Moves Http code into a separate library. 2017-09-21 19:21:25 +00:00
libraries.json Fix patch location for isolate library 2017-12-20 00:15:43 +00:00
libraries.yaml Fix patch location for isolate library 2017-12-20 00:15:43 +00:00
vmservice_libraries.json Remove compiling platform.dill from patch_sdk.dart 2017-10-06 15:34:37 +00:00
vmservice_libraries.yaml Remove compiling platform.dill from patch_sdk.dart 2017-10-06 15:34:37 +00:00