typetools / typetools/checker-framework
All inheritable declaration annotations are being inherited, regardless of their relationship
Open
Nobody has claimed this yet.
bug
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
When inheriting related declaration annotations, the element should inherit
only the "stronger ones", instead of all of them.
For example:
class Super {
@Pure
void foo(){}
}
class clazz extends Super {
@SideEffectFree
@Override
void foo(){}
}
We want clazz.foo() to have only the @Pure annotation since @Pure and
@SideEffectFree are related, but instead it currently has both of them.
There is a test case for that issue in
checker-framework/checker/jtreg/nullness/inheritDeclAnnoPersist/Extends.java:
method m3().
Original issue reported on code.google.com by pbsf...@gmail.com on 17 Jul 2014 at 10:12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with checker/jtreg/nullness/inheritDeclAnnoPersist/Extends.java, especially method m3(), and run the relevant jtreg test to reproduce the annotation inheritance behavior. Trace the declaration-annotation inheritance logic that handles related annotations. Done means only the stronger related annotation, such as @Pure rather than both @Pure and @SideEffectFree, is inherited.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100