Closed
Description
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.defaultType
s of generic functions to _FunctionType
and use those when type parameters are missing in dynamic invocations.