-
Notifications
You must be signed in to change notification settings - Fork 248
Methods usable as filters #934
Methods usable as filters #934
Conversation
@@ -28,7 +29,7 @@ class DynamicFieldGetterFactory implements FieldGetterFactory { | |||
instanceMirror.invoke(symbol, args, namedArgs).reflectee; | |||
} | |||
|
|||
FieldGetter getter(Object object, String name) { | |||
Function getter(Object object, String name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
_isInNameList(String s) { | ||
return _namesList.any((element) => element == s); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bool, =>
I prefer to have public then private properties and then public and private methods. Most of the time you are interested in the public api. Might not be that relevant here but I would like to propose this as a convention across the code base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not relevant here, I'll revert changes to this file anyway.
expect(getterFactory.isMethod(user, 'isUnderAge')).toEqual(true); | ||
}); | ||
|
||
it('should return false is field is a function', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhevery Should this actually return true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it shouldn't :)
|
"toString": (o) => o.toString | ||
"toString": (o) => o.toString, | ||
"isUnderAge": (o) => o.isUnderAge, | ||
"isUnderAgeAsVariable": (o) => o.isUnderAgeAsVariable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
append a "," to avoid diff noise ?
… show up as changes Closes #934
@mhevery i think I can get way with METHOD_GETTER, but not really METHOD_IDENTITY. |
… show up as changes Closes #934
… show up as changes Closes dart-archive#934
… show up as changes Closes dart-archive#934 fix(DCCD): when watching variables, always fire on first digest
… show up as changes Closes dart-archive#934 fix(DCCD): when watching variables, always fire on first digest
@chirayuk Your changes to method getters is in; could you review this PR and help @markovuksanovic get it in? |
@vicb Can you incorporate this change to your WatchGroup refactoring. |
@vicb, you are assigned to the PR -- are you reviewing? |
I'll integrate this in the watch group refactoring |
Closing, and letting @vicb take care of it. |
No description provided.