Closed
Description
I generally don't expect that specifying a generic which exactly matches what would be inferred should impact behavior, but it changes how arguments are inferred.
For example
void something<T extends Object>(void Function(T) c) {}
void main() {
something<Object>((arg) {});
something((arg) {});
}
In both cases the generic T
takes the value Object
, however in the latter case the arg
has an inferred type of Object?
instead of Object
.
Metadata
Metadata
Assignees
Labels
No labels