Closed
Description
Consider the following code:
typedef num FunctionReturningNum();
main() {
Object o = 1;
FunctionReturningNum a = () => o;
FunctionReturningNum b = () { return o; }
}
Type inference currently infers a return type of Object
for the closure in a
, and a return type of num
for the closure in b
.
The behavior of expression-type closures should be changed to match that of block-type closures.