Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2015, the Dart Team. All rights reserved. Use of this | |
| 2 // source code is governed by a BSD-style license that can be found in | |
| 3 // the LICENSE file. | |
| 4 | |
| 5 import "package:expect/expect.dart"; | |
| 6 | |
| 7 confuse(x) => [1, 'x', true, null, x].last; | |
|
floitsch
2015/07/15 14:55:00
The expect package has annotations to assume 'dyna
| |
| 8 | |
| 9 Iterable<int> foo() sync* { | |
| 10 var a = confuse(1); | |
| 11 if (a < 10) { | |
| 12 yield 2; | |
| 13 } | |
| 14 } | |
| 15 | |
| 16 main() { | |
| 17 Expect.listEquals(foo().toList(), [2]); | |
| 18 } | |
| OLD | NEW |