Closed
Description
The Function
interface is used by several packages, such as package:test
to be able to declare the input/output is a Function, no matter how many arguments/signature. That's nice. But...
I'm getting a "Unsound implicit cast from Function to () -> dynamic".
I'm not sure how to solve this nicely. You can see a reproduction case on Dartpad, or below:
void main() {
run(expectAsync((String t) {}));
}
Function expectAsync(Function callback) => callback;
/*=E*/ run/*<E>*/(/*=E*/ action(String t)) => action('Hello');
I realize this might not be "strong mode" safe. If so, what is the Future of Function
?