Commit Graph

2 Commits

Author SHA1 Message Date
Anna Gringauze 33274b6fae [dartdevc] removed unnecessary '.bind(this)' + added doc comments.
Bug https://github.com/dart-lang/sdk/issues/38896

Change-Id: If5399c19c178e7b379d7827bde1277c2bf18062e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123470
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-10-30 18:18:01 +00:00
Anna Gringauze 32c212e3eb [dartdevc] Add binding to 'this' for spread and 'yield' expressions
DDC does not generate correct bindings for async operations in spread,
 resulting in errors on member accesses.

```
class A {
    m1() => [1, 2];
    Future run() async {
      return [await null, ...m1()];
    }
}
```

Another case with yield:

```
class C {
    List<int> m2() => [1, 2];

    Future run() async {
      return await run3().toList();
    }

    Stream<int> run3() async* {
      for(var k in [... await m2()])
        yield k;
    }
}
```

Fixes #38896

Change-Id: I6ea28080414e5843ab647516cc223fd218f8c17e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123465
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2019-10-29 21:20:26 +00:00