Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: tests/language_strong/async_cascade_test.dart

Issue 2797873002: Preserve async markers when parsing js_ast (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/dev_compiler/lib/src/js_ast/template.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 import 'dart:async';
2
3 import 'package:expect/expect.dart';
4
5 class Foo {
6 Future _x;
7 int z;
8 List list = [];
9
10 Future foo() async {
11 _x ??= new Future(() async {
Jennifer Messerly 2017/04/04 23:34:24 is it worth adding a comment about what's going on
vsm 2017/04/05 19:14:31 Thanks - added comment pointing to #issue number f
12 z = await new Future.value(42);
13 list = list.toList()..add(z);
Jennifer Messerly 2017/04/04 23:34:24 // this triggers a nested MetaLet which breaks the
vsm 2017/04/05 19:14:31 Ditto
14 });
15 await _x;
16 return list[0];
17 }
18 }
19
20 main() async {
21 var f = new Foo();
22 var result = await f.foo();
23 Expect.equals(42, result);
24 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/src/js_ast/template.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698