Closed jodinathan closed 2 years ago
Bar
means Bar<Foo>
(instantiate to bounds). You mean to write Bar<T>
in foo
signature:
void foo(Bar<T> fn) {}
Then foo(load)
will compile.
load<T>
does not compile because load
is not a generic function itself so it expects no type arguments of its own.
Can't seem to be able to use
typedef
and generics while it works when using the full function signature.Dart SDK version: 2.16.2 (stable) (Tue Mar 22 13:15:13 2022 +0100) on "macos_x64"