HackerTrans
TopNewTrendsCommentsPastAskShowJobs

stereotype441

no profile record

comments

stereotype441
·4 lata temu·discuss
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
stereotype441
·4 lata temu·discuss
Hi!

I'm one of the developers of Dart, and I just tried to reproduce your bug. Here's what I tried:

  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.

Can you say more about what you were trying to do when you ran into this bug? Ideally file an issue at https://github.com/dart-lang/sdk/issues/new. (We really do read and respond to them, and if you find a bug in the grammar, there's a good chance I'll be the one to fix it!)

Paul (https://github.com/stereotype441)