-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Should adapter_, root_ and foundation_ be @protected instead of @private? #767
Comments
They absolutely should. In fact, I believe I had it properly annotated within my Would you be willing to submit a PR with these changes? I also believe that both |
Sure, I'll take it. |
In terms of |
Returning a plain object will throw a warning since the expected return type is {!MDCComponent}. No warning if the function body is left empty, and more importantly, the annotations on static methods don't seem to be inherited by subclass implementations. For example the broken code below does not throw any warning.
Changing Removing
But in this case, is defining MDCComponent.attachTo still useful? |
According to Closure's annotating documentation, protected properties are available to instance methods of any subclass. With
@private
, compilation seems to trigger a warning ("Access to private property adapter_ of XXX not allowed here").The text was updated successfully, but these errors were encountered: