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

Unified Diff: corelib/src/comparable.dart

Issue 10832401: Gentle start with removing explicit interfaces (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « no previous file | corelib/src/function.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/comparable.dart
===================================================================
--- corelib/src/comparable.dart (revision 11241)
+++ corelib/src/comparable.dart (working copy)
@@ -4,6 +4,10 @@
// Dart core library.
-interface Comparable {
- int compareTo(Comparable other);
+abstract class Comparable {
+ factory Comparable._uninstantiable() {
+ throw const UnsupportedOperationException(
+ "abstract class Comparable cannot be instantiated");
+ }
bakster 2012/08/24 06:32:50 I don't understand why this is needed. If the clas
hausner 2012/08/24 15:25:45 I checked this with Gilad of course. He says that
+ abstract int compareTo(Comparable other);
}
« no previous file with comments | « no previous file | corelib/src/function.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698