| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Mocks of things that Leg cannot read directly. | 5 // Mocks of things that Leg cannot read directly. |
| 6 | 6 |
| 7 // TODO(ahe): Remove this file. | 7 // TODO(ahe): Remove this file. |
| 8 | 8 |
| 9 class AssertionError {} | 9 class AssertionError {} |
| 10 class TypeError extends AssertionError {} | 10 class TypeError extends AssertionError {} |
| 11 class FallThroughError {} | 11 class FallThroughError {} |
| 12 | 12 |
| 13 // TODO(ahe): VM specfic exception? | 13 // TODO(ahe): VM specfic exception? |
| 14 class InternalError { | 14 class InternalError { |
| 15 const InternalError(this._msg); | 15 const InternalError(this._msg); |
| 16 String toString() => "InternalError: '${_msg}'"; | 16 String toString() => "InternalError: '${_msg}'"; |
| 17 final String _msg; | 17 final String _msg; |
| 18 } | 18 } |
| 19 | 19 |
| 20 // TODO(ahe): VM specfic exception? | 20 // TODO(ahe): VM specfic exception? |
| 21 class StaticResolutionException implements Exception {} | 21 class StaticResolutionException implements Exception {} |
| 22 | 22 |
| 23 class List<E> implements Iterable<E> { | |
| 24 factory List([int length]) => Primitives.newList(length); | |
| 25 factory List.from(Iterable<E> other) { | |
| 26 throw 'List.from is not implemented'; | |
| 27 } | |
| 28 } | |
| 29 | |
| 30 void assert(condition) {} | 23 void assert(condition) {} |
| OLD | NEW |