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

Unified Diff: lib/core/expando.dart

Issue 10911201: Reapply changes to Expando patching. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move code around a bit. Created 8 years, 3 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/expando.dart
diff --git a/lib/core/expando.dart b/lib/core/expando.dart
index d537659146000ba03d5c339cd2f40adb432fb19b..901cee5c29ed24d621ed3d940031bd33c43c5745 100644
--- a/lib/core/expando.dart
+++ b/lib/core/expando.dart
@@ -5,7 +5,7 @@
/**
* An [Expando] allows adding new properties to objects.
*/
-interface Expando<T> default ExpandoImplementation<T> {
+class Expando<T> {
/**
* The name of the this [Expando] as passed to the constructor. If
@@ -19,20 +19,25 @@ interface Expando<T> default ExpandoImplementation<T> {
* [Expando]s with the same name yields two [Expando]s that work on
* different properties of the objects they are used on.
*/
- const Expando([String name]);
+ const Expando([String this.name]);
+
+ /**
+ * Expando toString method override.
+ */
+ String toString() => "Expando:$name";
/**
* Gets the value of this [Expando]'s property on the given
* object. If the object hasn't been expanded, the method returns
* [null].
*/
- T operator [](Object object);
+ external T operator [](Object object);
/**
* Sets the value of this [Expando]'s property on the given
* object. Properties can effectively be removed again by setting
* their value to null.
*/
- void operator []=(Object object, T value);
+ external void operator []=(Object object, T value);
}

Powered by Google App Engine
This is Rietveld 408576698