| 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 @patch | 5 @patch |
| 6 class Error { | 6 class Error { |
| 7 @patch | 7 @patch |
| 8 static String _objectToString(Object object) { | 8 static String _objectToString(Object object) { |
| 9 return Object._toString(object); | 9 return Object._toString(object); |
| 10 } | 10 } |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 } | 406 } |
| 407 | 407 |
| 408 dynamic _classIdEqualsAssert( | 408 dynamic _classIdEqualsAssert( |
| 409 int position, dynamic instance, _Type type, int cid, int otherCid) { | 409 int position, dynamic instance, _Type type, int cid, int otherCid) { |
| 410 if (cid != otherCid && instance != null) { | 410 if (cid != otherCid && instance != null) { |
| 411 _TypeError._throwNew(position, instance, type, " in type cast", null); | 411 _TypeError._throwNew(position, instance, type, " in type cast", null); |
| 412 } | 412 } |
| 413 | 413 |
| 414 return instance; | 414 return instance; |
| 415 } | 415 } |
| 416 |
| 417 /// Used by Fasta to report a runtime error when a final field with an |
| 418 /// initializer is also initialized in a generative constructor. |
| 419 /// |
| 420 /// Note: in strong mode, this is a compile-time error and this class becomes |
| 421 /// obsolete. |
| 422 class _DuplicatedFieldInitializerError extends Error { |
| 423 final String _name; |
| 424 |
| 425 _DuplicatedFieldInitializerError(this._name); |
| 426 |
| 427 toString() => "Error: field '$_name' is already initialized."; |
| 428 } |
| OLD | NEW |