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

Side by Side Diff: test/codegen/syncstar_syntax.dart

Issue 1207313002: initial sync*, part of #221 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 Iterable<int> foo() sync* {
6 yield 1;
7 yield* [2, 3];
8 }
9
10 class Class {
11 Iterable<int> bar() sync* {
12 yield 1;
13 yield* [2, 3];
14 }
15
16 static Iterable<int> baz() sync* {
17 yield 1;
18 yield* [2, 3];
19 }
20 }
21
22 main() {
23 Iterable<int> qux() sync* {
24 yield 1;
25 yield* [2, 3];
26 }
27
28 foo().forEach(print);
29 new Class().bar().forEach(print);
30 Class.baz().forEach(print);
31 qux().forEach(print);
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698