Thanks for the bug report! For anyone else who is following along, the issue is tracked here: https://github.com/dart-lang/sdk/issues/48460
int? f(bool b, Map<String, int> c, int d, int e) {
int? a;
a = b ? c["${d}"] : e;
return a;
}
main() {
print(f(true, {'1': 10}, 1, 20));
print(f(false, {'1': 10}, 1, 20));
}
This program analyzes and runs cleanly for me, with no need for extra parentheses.