New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer future flattening needs to be updated to follow spec #31887

Closed
stereotype441 opened this Issue Jan 12, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@stereotype441
Member

stereotype441 commented Jan 12, 2018

I'm currently working on a CL based on @kmillikin's https://dart-review.googlesource.com/c/sdk/+/32620, which updates the front end's future flattening behavior to match the new Dart 2.0 specification (flattening is no longer recursive, so only one level of flattening is performed at a time).

A similar fix will need to be made to the analyzer code base.

@bwilkerson bwilkerson referenced this issue Jan 12, 2018

Closed

Support full type inference in the analyzer #31638

15 of 16 tasks complete

whesse pushed a commit that referenced this issue Jan 15, 2018

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>

@stereotype441 stereotype441 added this to the 2.0-beta1 milestone Feb 9, 2018

@bwilkerson bwilkerson removed this from the 2.0-beta1 milestone Mar 20, 2018

dart-bot pushed a commit that referenced this issue Jun 15, 2018

Fix various bugs and regularize behavior of returns statements in
various kinds of functions.

Closes-bug: #31887
Closes-bug: #30638
Closes-bug: #32233
Closes-bug: #32881
Closes-bug: #31278
Change-Id: I4ebd7e71096d611e189b571ba5de2998dd11c98b
Reviewed-on: https://dart-review.googlesource.com/60300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment