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 /// This produces an error with --strong enabled, but not otherwise. |
| 6 class MyIterable extends Iterable<String> { |
| 7 // Error: invalid override |
| 8 Iterator<Object> get iterator => [1, 2, 3].iterator; |
| 9 } |
| 10 |
| 11 main() { |
| 12 var i = new MyIterable().iterator..moveNext(); |
| 13 print(i.current); |
| 14 |
| 15 // Error: type check failed |
| 16 List<String> list = <dynamic>[1, 2, 3]; |
| 17 print(list); |
| 18 } |
OLD | NEW |