Open
Description
In the code below () => 10
would have a parent context capturing v
even though it does not need it. We could avoid linking closure context to parent context unless it really needs it.
foo(v) {
return () {
print(v);
return () => 10;
};
}
Related to flutter/flutter#79605