Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(645)

Unified Diff: lib/src/path_observer.dart

Issue 198060043: Cleanup method signatures. (Closed) Base URL: git@github.com:dart-lang/observe.git@master
Patch Set: ptal Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/observer_transform.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/path_observer.dart
diff --git a/lib/src/path_observer.dart b/lib/src/path_observer.dart
index 297bd1dc9cdd9df28a16d5f8e0130dda4d5a1ce8..d0eb85ddeddc10e40086fad0f042a618a1468f8a 100644
--- a/lib/src/path_observer.dart
+++ b/lib/src/path_observer.dart
@@ -41,7 +41,7 @@ class PathObserver extends _Observer implements Bindable {
PropertyPath get path => _path;
/// Sets the value at this path.
- void set value(Object newValue) {
+ void set value(newValue) {
if (_path != null) _path.setValueFrom(_object, newValue);
}
@@ -289,8 +289,7 @@ _getObjectProperty(object, property) {
// TODO(sigmund): should we also support using checking dynamically for
// whether the type practically implements the indexer API
// (smoke.hasInstanceMethod(type, const Symbol('[]')))?
- if (object is Indexable<String, dynamic> ||
- object is Map<String, dynamic> && !_MAP_PROPERTIES.contains(property)) {
+ if (object is Indexable || object is Map && !_MAP_PROPERTIES.contains(property)) {
return object[smoke.symbolToName(property)];
}
try {
@@ -320,8 +319,7 @@ bool _setObjectProperty(object, property, value) {
}
} else if (property is Symbol) {
// Support indexer if available, e.g. Maps or polymer_expressions Scope.
- if (object is Indexable<String, dynamic> ||
- object is Map<String, dynamic> && !_MAP_PROPERTIES.contains(property)) {
+ if (object is Indexable || object is Map && !_MAP_PROPERTIES.contains(property)) {
object[smoke.symbolToName(property)] = value;
return true;
}
« no previous file with comments | « lib/src/observer_transform.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b