This code is (correctly) rejected by both the analyzer and the CFE:
int test<T extends int Function(int)>(T Function() createT) {
var tValue = createT();
return tValue(''); // ERROR: 'String' not assignable to 'int'
}
This code is equivalent (the only difference is that the local variable tValue has been inlined), so it should be rejected too. It is correctly rejected by the CFE, but it is accepted by the analyzer:
int test<T extends int Function(int)>(T Function() createT) {
return createT()('');
}