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

Unified Diff: runtime/lib/errors_patch.dart

Issue 2917863003: Various infrastructure changes. (Closed)
Patch Set: Created 3 years, 7 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
Index: runtime/lib/errors_patch.dart
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index 595f6f8620bcde3ab34e253f191b7a08fa6cdd59..596df086c2918d8d393b9248f8223ac95acd63bd 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -413,3 +413,16 @@ dynamic _classIdEqualsAssert(
return instance;
}
+
+/// Used by Fasta to report a runtime error when a final field with an
+/// initializer is also initialized in a generative constructor.
+///
+/// Note: in strong mode, this is a compile-time error and this class becomes
+/// obsolete.
+class _DuplicatedFieldInitializerError extends Error {
+ final String _name;
+
+ _DuplicatedFieldInitializerError(this._name);
+
+ toString() => "Error: field '$_name' is already initialized.";
+}

Powered by Google App Engine
This is Rietveld 408576698