dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.26k stars 1.58k forks source link

SuperNegativeTest doesn't match current spec #358

Closed DartBot closed 9 years ago

DartBot commented 13 years ago

This issue was originally filed by jimhug@google.com


It looks like all three implementations (dartc, vm and frog) currently fail on this test, and the spec says:   "If no superinitializer is provided, an implicit superinitializer of the form super() is added at the end of k’s initializer list, unless the enclosing class is class Object."

This was reported as Bug 4400118, but I wanted to get this into the public system and hopefully get this resolved quickly as an obvious test bug. I don't know if there is a test for the correct insertion of the missing super call - but this test could be usefully converted to do that with a little extra verification that A's constructor is actually called when creating a new B.

DartBot commented 13 years ago

This comment was originally written by drfibonacci@google.com


Added Area-Frog, Triaged labels.

DartBot commented 13 years ago

This comment was originally written by @mhausner


SuperNegativeTest is indeed obsolete. Dart specifies that an implicit call to super() is added to the initializer list if no explicit super call is present.

We have Constructor4Test to check that implicit super calls are added, so I think the best is to eliminate SuperNegativeTest. I'll do that.


Set owner to @mhausner.

DartBot commented 13 years ago

This comment was originally written by @mhausner


Test removed.


Added Fixed label.