-
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
Unexpected warning when implementing an interface without @extends #3137
Comments
Things which don't affect this warning:
|
With these changes we have zero errors and zero warnings with `RECOMMENDED_FLAGS`! Most of the changes were adding `@override` for methods and properties in mixins. Apparently if you implement an interface you need to say `@override` for each method or property on the interface. This combines with our mixin strategy to the tune of needing to add `@override` on every non-private method and property. I'm not sure this is intended behavior of the compiler. Filed google/closure-compiler#3137 to see if it is.
This is WAI, but I agree the documentation is misleading.
The "not required" part really means "not required for type inference to do its job." The wiki should say something like:
Does that wording make more sense to you? I can update the wiki. |
Ah, your rewording is much better! |
The following code:
Produces the warning:
The documentation at https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#override seems to suggest that this shouldn't be necessary:
This is with the internal flag set
RECOMMENDED_FLAGS
. I didn't see a way to repro it on the closure compiler service. Googlers can see cl/220008730 internally, or repro withThe text was updated successfully, but these errors were encountered: