dart-sdk/pkg
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
..
analysis_server FrontEndCompiler that computes all information about many libraries at once. 2018-01-09 07:05:54 +00:00
analysis_server_client Test failing fix. Stdin is mocked to avoid the typing issue; not critical for this unit test. 2017-08-08 19:00:37 -07:00
analyzer Use the new spec for Future flattening for type inference 2018-01-15 07:09:36 +00:00
analyzer_cli Create the new flag --use-cfe in the analyzer, analysis server and analyzer_cli and migrate the old behavior of --preview-dart-2 to --use-cfe. The --preview-dart-2 flag is now a no-op, with functionality coming soon. 2018-01-08 22:37:05 +00:00
analyzer_plugin Code complete identifiers not directly referenced by the analyzer AST 2017-12-22 21:55:35 +00:00
async_helper Update language_2/await_test.dart to use async_helper. 2017-12-06 12:05:59 +00:00
browser
compiler Several deferred loading improvements: 2018-01-13 01:42:32 +00:00
dart_internal Disable analyzer warning on special 'dart:_internal' import. 2017-12-21 23:21:04 +00:00
dart_messages Make pkg/dart_messages strong. 2017-06-08 21:55:05 -07:00
dev_compiler fix #31782, implement not-null analysis for dartdevk 2018-01-12 22:40:50 +00:00
expect Add Expect.notIdentical and Expect.allDistinct to package:expect. 2018-01-12 09:33:16 +00:00
front_end Use the new spec for Future flattening for type inference 2018-01-15 07:09:36 +00:00
js Making license files consistent across all packages 2017-09-28 19:33:08 +00:00
js_ast Fix printer_callback_test 2017-12-21 14:30:49 +00:00
kernel Use the new spec for Future flattening for type inference 2018-01-15 07:09:36 +00:00
meta Add a README file to the meta package 2017-12-17 21:53:17 +00:00
microlytics
sourcemap_testing Add source information to parameter stubs. 2018-01-12 21:23:40 +00:00
status_file Another passing test. 2017-12-15 05:01:54 +00:00
telemetry Remove Fuchsia-specific build files. 2017-10-19 17:52:37 +00:00
testing [pkg testing] Fix off-by-one in cmdline parsing 2017-11-20 11:35:57 +00:00
typed_mock Remove Fuchsia-specific build files. 2017-10-19 17:52:37 +00:00
vm Link kernel service dill with the command line dart executable. 2018-01-12 20:40:41 +00:00
.gitignore
BUILD.gn
pkg.status [infra] Normalize pkg.status 2018-01-11 14:33:48 +00:00