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

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

Issue 2951453002: [kernel] Make fasta call a new constructor on FallThroughError (Closed)
Patch Set: Addressed comments 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/kernel/lib/core_types.dart ('k') | sdk/lib/_internal/js_runtime/lib/core_patch.dart » ('j') | 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 // Fields _url, _line, and _column are only used for debugging purposes. 107 // Fields _url, _line, and _column are only used for debugging purposes.
108 final String _url; 108 final String _url;
109 final int _line; 109 final int _line;
110 final int _column; 110 final int _column;
111 final String _errorMsg; 111 final String _errorMsg;
112 } 112 }
113 113
114 @patch 114 @patch
115 class FallThroughError { 115 class FallThroughError {
116 FallThroughError._create(this._url, this._line); 116 @patch
117 FallThroughError._create(String url, int line)
118 : _url = url,
119 _line = line;
117 120
118 static _throwNew(int case_clause_pos) native "FallThroughError_throwNew"; 121 static _throwNew(int case_clause_pos) native "FallThroughError_throwNew";
119 122
120 @patch 123 @patch
121 String toString() { 124 String toString() {
122 return "'$_url': Switch case fall-through at line $_line."; 125 return "'$_url': Switch case fall-through at line $_line.";
123 } 126 }
124 127
125 // These new fields cannot be declared final, because a constructor exists 128 // These new fields cannot be declared final, because a constructor exists
126 // in the original version of this patched class. 129 // in the original version of this patched class.
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 _DuplicatedFieldInitializerError(this._name); 432 _DuplicatedFieldInitializerError(this._name);
430 433
431 toString() => "Error: field '$_name' is already initialized."; 434 toString() => "Error: field '$_name' is already initialized.";
432 } 435 }
433 436
434 @patch 437 @patch
435 class _ConstantExpressionError { 438 class _ConstantExpressionError {
436 @patch 439 @patch
437 _throw(error) => throw error; 440 _throw(error) => throw error;
438 } 441 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/core_types.dart ('k') | sdk/lib/_internal/js_runtime/lib/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698