sdk
sdk copied to clipboard
Future chaining does not respect ignored futures
import 'dart:async';
void main() async {
final c = Completer<void>();
Future.error("a").whenComplete(() {
c.complete();
return Future.error("b");
}).ignore();
await c.future;
}
$ out/ReleaseX64/dart /tmp/test.dart
Unhandled exception:
b
Ack. I'd have expected it to be the "a" error which wasn't ignored, if anything.
This'll be fun to debug. :sob:
And for the record, @mraleph was completely correct, it was the chaining which broke the ignore.