DDC `async*` bug

The following test prints:

Hello, World!
Hello, World!
Hello, World!
[hello]

in the VM and dart2js, but prints nothing DDC.

import 'dart:async';

  Stream<String> testStream(String test) async* {
    try {
      await testFunction();
      yield test;
    } catch (e) {
      yield test;
      print('Hello, World!');
      print('Hello, World!');
      print('Hello, World!');
    }
  }

  Future<String> testFunction() async {
    await testFunctio2();
    return "";
  }

  Future<String> testFunctio2() async {
    throw Exception("test");
  }

void main() async {
  var stream = testStream("hello");
  print(await stream.toList());
}

Author: Fantashit

2 thoughts on “DDC `async*` bug

  1. Thanks for the response. No, it’s not blocking I just wanted to know if there is any progress because the original issue is closed now. It’s just an annoying bug, because you can’t really use the ddc in case you work a lot with streams, like I do.

  2. The debug and release compilers are different on the web; this issue only exists for the debug compiler. We plan on resolving async disparities between our various backends soon ™.

Comments are closed.