Skip to content

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

Closed
@osa1

Description

@osa1

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.

Metadata

Metadata

Assignees

Labels

area-dart2wasmIssues for the dart2wasm compiler.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions