dart-lang / co19

A Dart language and library conformance test suite
BSD 3-Clause "New" or "Revised" License
37 stars 28 forks source link

[Wildcard Variables] Test expectations are wrong in binding_A03_t02.dart #2833

Closed kallentu closed 2 weeks ago

kallentu commented 2 weeks ago

The value of _log should be updated for each call. I believe that main should have the following expectations instead? Since even though we don't use the values returned by testx(...), we still execute each init call.

main() {
  test1();
  Expect.equals("init(1);", _log);
  test2();
  Expect.equals("init(2);", _log);
  test3();
  Expect.equals("init(3);", _log);
}

cc. @eernstg @sgrekhov

eernstg commented 2 weeks ago

Hmmmm, looking at the nnbd spec, I can't see a reason why an evaluation of any of the wildcarded variables would take place during execution of this program, in which case I'd expect the log to remain empty.

How would the evaluation be triggered?

kallentu commented 2 weeks ago

Ah shoot, yeah, you're right Erik. This is a CFE issue really. We can close the https://github.com/dart-lang/co19/pull/2834#event-14023201037 PR. I'll fix this on the CFE side.