-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add property reflection for Polymer computed properties and observers #3184
Add property reflection for Polymer computed properties and observers #3184
Conversation
cc @aomarks |
Internal issue http://b/122359057 created |
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.
This is great!
I'm on vacation this week. I'll address the feedback next week. |
@aomarks I've made the changes you requested |
5d57195
to
2e2bdae
Compare
Importing for internal review |
…on to avoid unreachable code errors
@lauraharker @aomarks I have been unable to recreate the remaining issue. I've re-arranged the code a bit on a hunch and also updated the source references so that the warning should point to what exactly is triggering the warning. If you can try this again with the latest changes, that will at least help me narrow down what's causing the type warning. It's a bit odd because I'm not changing any type signatures with this code. |
@ChadKillingsworth here's the new warning I get:
Here's |
…pass to add them for us. Prevents the compiler from assuming nullability on a property reference with no type annotation.
Thanks - that helps. Here's my best guess: the compiler is treating the I've refactored the code to add the synthetic sink statements directly rather than relying on the CheckSideEffects pass to add them. Hopefully this will solve the issue. |
That fixed it! I'm running another set of internal tests now. |
Or no, that was a false positive. I now get a different error:
|
The latest commit fixes the error I was seeing. 👍 |
Submitting this change internally |
Polymer observers and computed properties use string reflection. When property renaming is enabled, add property reflection calls to these strings such that they are renamed consistently.
Example:
The
'_computeFoo(bar)'
string will now be parsed and reflection calls added like: