Skip to content

DDC async* bug #39994

Closed
Closed
@vsmenon

Description

@vsmenon

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());
}

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions