Closed
Description
We're not getting the right type on math.max below:
import 'dart:math' as math;
main() {
takeFn(math.max/*<int>*/);
}
void takeFn(int fn(int a, int b)) {}
We're getting the following errors:
[error] Type check failed: math.max (<T extends num>(T, T) → T) is not of type (int, int) → int (/Users/vsm/git/dev_compiler/foo.dart, line 7, col 10)
[warning] The argument type '(T, T) → T' cannot be assigned to the parameter type '(int, int) → int' (/Users/vsm/git/dev_compiler/foo.dart, line 7, col 10)
1 error and 1 warning found.