OLD | NEW |
(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 } |
OLD | NEW |