void main() {
print(doStuff.runtimeType);
print(((e) => doStuff(e)).runtimeType);
}
int doStuff(String hallo) {
return 42;
}
executed in the dartpad yields
(String) => int
(dynamic) => int
I would expect both to have the same type. Can somebody explain why dart fails to infer the type of the argument e?