Skip to content
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] Implement new rules about 'derives a future type' #55051

Open
eernstg opened this issue Feb 28, 2024 · 2 comments
Open

[analyzer] Implement new rules about 'derives a future type' #55051

eernstg opened this issue Feb 28, 2024 · 2 comments
Labels
analyzer-spec Issues with the analyzer's implementation of the language spec area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. implementation Track the implementation of a specific feature (use on area-meta issue, not issues for each tool) P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@eernstg
Copy link
Member

eernstg commented Feb 28, 2024

The language team has just agreed to land dart-lang/language#3574, which is an update to the definition of the function flatten and the associated concept about how "a type T derives a future type F".

Some background discussion can be found in #54628. The main point is that the new definition includes the ability to find a supertype of the form Future<...>, FutureOr<...>, Future<...>?, or FutureOr<...>? that were previously not found.

This change is not considered to be a breaking change because the CFE already implements the updated rule.

A test of the new rule is landed by https://dart-review.googlesource.com/c/sdk/+/354020, as tests/language/async/derive_future_type_test.dart.

@eernstg eernstg added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-spec Issues with the analyzer's implementation of the language spec implementation Track the implementation of a specific feature (use on area-meta issue, not issues for each tool) labels Feb 28, 2024
@bwilkerson bwilkerson added the P2 A bug or feature request we're likely to work on label Mar 13, 2024
@bwilkerson
Copy link
Member

@scheglov

@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Mar 15, 2024
@eernstg
Copy link
Member Author

eernstg commented Mar 15, 2024

I can see that the language specification at https://spec.dart.dev/DartLangSpecDraft.pdf hasn't been updated along with the latest update to the LaTeX source.

The reason for this is that the automatic generation of a PDF from the source failed, because of an unrelated failure (shown on the Dart CI log at https://github.com/dart-lang/language/actions/runs/8084567444/job/22725574044).

I reported the issue here: dart-lang/language#3656.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-spec Issues with the analyzer's implementation of the language spec area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. implementation Track the implementation of a specific feature (use on area-meta issue, not issues for each tool) P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants