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

Unified Diff: lib/core/errors.dart

Issue 11013010: Throw AbstractClassInstantiationError on abstract class instantiation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged with 10990108. Created 8 years, 2 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: lib/core/errors.dart
diff --git a/lib/core/errors.dart b/lib/core/errors.dart
index 85e9f937181675ac573104c004fd35b764896051..d33534df7048705e3e4ae82f35586acf9d7be04e 100644
--- a/lib/core/errors.dart
+++ b/lib/core/errors.dart
@@ -46,7 +46,10 @@ class FallThroughError implements Error {
const FallThroughError();
}
-class AbstractClassInstantiationError {
+class AbstractClassInstantiationError implements Error {
+ String toString() => "Cannot instantiate abstract class: '$_className'";
+ const AbstractClassInstantiationError(String this._className);
+ final String _className;
ahe 2012/10/11 18:27:07 Please use this order of members: fields construc
aam-me 2012/10/12 01:14:06 Done.
}
/**

Powered by Google App Engine
This is Rietveld 408576698