Skip to content

[dart2js] Async return type FutureOr<Object> returns Future<dynamic> #54317

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

Closed
eernstg opened this issue Dec 12, 2023 · 4 comments
Closed

[dart2js] Async return type FutureOr<Object> returns Future<dynamic> #54317

eernstg opened this issue Dec 12, 2023 · 4 comments
Assignees
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. web-dart2js

Comments

@eernstg
Copy link
Member

eernstg commented Dec 12, 2023

This is the dart2js specific issue for the behavior reported in #54311, which has the details (some details here: #54311 (comment)).

The main point is that we can have an async function with declared return type FutureOr<Object> that actually returns a Future<dynamic> (it should return a Future<Object>). The Kernel code which is generated for the example program seems to be correct, so the issue seems to be caused by the processing of this Kernel code in backends.

@eernstg eernstg added web-dart2js area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. labels Dec 12, 2023
@fishythefish fishythefish self-assigned this Dec 12, 2023
@kevmoo

This comment was marked as outdated.

@sigmundch

This comment was marked as outdated.

@fishythefish

This comment was marked as outdated.

@eernstg eernstg changed the title [dart2js] Return type FutureOr<Object> returns Future<dynamic> [dart2js] Async return type FutureOr<Object> returns Future<dynamic> Dec 13, 2023
@eernstg
Copy link
Member Author

eernstg commented Dec 13, 2023

Thanks, @fishythefish, that was indeed a copy/paste error!

copybara-service bot pushed a commit that referenced this issue Dec 13, 2023
Change-Id: Ic6f54cf14098c9cc1cfe01ee01a09e7be5ce419a
Bug: #54317
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341600
Reviewed-by: Nate Biggs <[email protected]>
Commit-Queue: Mayank Patke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. web-dart2js
Projects
None yet
Development

No branches or pull requests

4 participants