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
@Inherited annotations written in a stub file #3594
Comments
I think the question here is, is there any way to annotate a JDK library class declaration, via stub files, modifying the annotated JDK, or some other trick, such that the annotation will be inherited? As @Nargeshdb notes above just using |
Not currently, but I made a PR #3600 that reads inherited annotations from stub files and applies them to subclasses. |
Thanks, @smillst! @Nargeshdb is working on testing out #3600 |
If we have an @inherited annotation written in a stub file, subclasses in source code will not inherit the annotation!
e.g. Consider InheritedAnnotationType:
Add @InheritedAnnotationType to Socket in a stub file:
Then, SubSocket doesn't inherit @InheritedAnnotationType!
class SubSocket extends Socket {}
The text was updated successfully, but these errors were encountered: