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

Unified Diff: runtime/lib/errors_patch.dart

Issue 2230383003: Implement @patch annotation for patch class members (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/double_patch.dart ('k') | runtime/lib/expando_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors_patch.dart
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index 2deb7f967fd47fc5022ed3991c4e033cfde25004..89ade45e16c658ffda151d18fe5b6fdeafefc758 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -6,15 +6,15 @@ import 'dart:_internal' as internal;
import 'dart:convert' show JSON;
@patch class Error {
- /* @patch */ static String _objectToString(Object object) {
+ @patch static String _objectToString(Object object) {
return Object._toString(object);
}
- /* @patch */ static String _stringToSafeString(String string) {
+ @patch static String _stringToSafeString(String string) {
return JSON.encode(string);
}
- /* @patch */ StackTrace get stackTrace => _stackTrace;
+ @patch StackTrace get stackTrace => _stackTrace;
StackTrace _stackTrace;
}
@@ -100,7 +100,7 @@ class _CastError extends Error implements CastError {
static _throwNew(int case_clause_pos) native "FallThroughError_throwNew";
- /* @patch */ String toString() {
+ @patch String toString() {
return "'$_url': Switch case fall-through at line $_line.";
}
@@ -135,7 +135,7 @@ class _InternalError {
static _throwNew(int case_clause_pos, String className)
native "AbstractClassInstantiationError_throwNew";
- /* @patch */ String toString() {
+ @patch String toString() {
return "Cannot instantiate abstract class $_className: "
"_url '$_url' line $_line";
}
@@ -284,7 +284,7 @@ class _InternalError {
return "$msg\n\n";
}
- /* @patch */ String toString() {
+ @patch String toString() {
StringBuffer actual_buf = new StringBuffer();
int i = 0;
if (_arguments == null) {
« no previous file with comments | « runtime/lib/double_patch.dart ('k') | runtime/lib/expando_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698