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

Side by Side Diff: pkg/kernel/testcases/closures/syncstar.dart

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Review comments Created 3 years, 4 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
OLDNEW
(Empty)
1 /*
Dmitry Stefantsov 2017/08/24 15:07:29 I think the fix that changes /* */ to // and adds
2 * Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file.
5 */
6 range(int high) {
7 iter(int low) sync* {
8 while (high-- > low) yield high;
9 }
10
11 return iter;
12 }
13
14 main() {
15 var sum = 0;
16 for (var x in range(10)(2)) sum += x;
17
18 if (sum != 44) {
19 throw new Exception("Incorrect output.");
20 }
21 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/closures/loop2.dart.expect ('k') | pkg/kernel/testcases/closures/syncstar.dart.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698