Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: runtime/lib/errors_patch.dart

Issue 2917863003: Various infrastructure changes. (Closed)
Patch Set: Fix comment. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/target_implementation.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/target_implementation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698