Skip to content

[dart2wasm] Incorrect default type arguments passed in dynamic invocations #50992

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
osa1 opened this issue Jan 11, 2023 · 1 comment
Closed
Assignees
Labels
area-dart2wasm Issues for the dart2wasm compiler.

Comments

@osa1
Copy link
Member

osa1 commented Jan 11, 2023

Currently runtime type of functions (_FunctionType) has a field for type parameter bounds (TypeParameter.bound in kernel), but not for type parameter default values (TypeParameter.defaultType in kernel).

So when we have a dynamic invocation of a generic function and no type arguments are passed we're using the bounds as defaults, but bounds and defaults are not always the same. We should add TypeParameter.defaultTypes of generic functions to _FunctionType and use those when type parameters are missing in dynamic invocations.

@osa1 osa1 added the area-dart2wasm Issues for the dart2wasm compiler. label Jan 11, 2023
@osa1
Copy link
Member Author

osa1 commented Feb 14, 2023

@osa1 osa1 self-assigned this Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart2wasm Issues for the dart2wasm compiler.
Projects
None yet
Development

No branches or pull requests

1 participant