Analyzer does not recognize top-level function as constant. #13179
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P1
A high priority bug; for example, a single project is unusable or has many test failures
Milestone
Triggering code:
void f([void f([x]) = f]) { print("?");if (f != null) f(null); }
main() {
f();
print("ok");
}
This assumes (based on dart2js and dart implementations) that the scope of the default expression "f" will refer to the top-level function.
The analyzer seems to expect it to contain the formal parameter declarations as well (which can never be constant anyway, so it's not useful).
The text was updated successfully, but these errors were encountered: