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

Unified Diff: test/generated_sdk/lib/core/expando.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 | « test/generated_sdk/lib/core/errors.dart ('k') | test/generated_sdk/lib/core/function.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/generated_sdk/lib/core/expando.dart
diff --git a/test/generated_sdk/lib/core/expando.dart b/test/generated_sdk/lib/core/expando.dart
index 5047a748dbdc8bbc041137dc1944db249af46c49..99f6f64b63307a77c3e30b07da7625938066da68 100644
--- a/test/generated_sdk/lib/core/expando.dart
+++ b/test/generated_sdk/lib/core/expando.dart
@@ -30,7 +30,12 @@ class Expando<T> {
*/
final String name;
- @patch
+ /**
+ * Creates a new [Expando]. The optional name is only used for
+ * debugging purposes and creating two different [Expando]s with the
+ * same name yields two [Expando]s that work on different properties
+ * of the objects they are used on.
+ */
Expando([String name]) : this.name = name;
/**
@@ -38,13 +43,25 @@ class Expando<T> {
*/
String toString() => "Expando:$name";
- @patch
+ /**
+ * Gets the value of this [Expando]'s property on the given
+ * object. If the object hasn't been expanded, the method returns
+ * [:null:].
+ *
+ * The object must not be a number, a string, a boolean or null.
+ */
T operator[](Object object) {
var values = Primitives.getProperty(object, _EXPANDO_PROPERTY_NAME);
return (values == null) ? null : Primitives.getProperty(values, _getKey());
}
- @patch
+ /**
+ * Sets the value of this [Expando]'s property on the given
+ * object. Properties can effectively be removed again by setting
+ * their value to null.
+ *
+ * The object must not be a number, a string, a boolean or null.
+ */
void operator[]=(Object object, T value) {
var values = Primitives.getProperty(object, _EXPANDO_PROPERTY_NAME);
if (values == null) {
« no previous file with comments | « test/generated_sdk/lib/core/errors.dart ('k') | test/generated_sdk/lib/core/function.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698