-
Notifications
You must be signed in to change notification settings - Fork 34
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
Bug when inserting upper bound of class type variable #154
Comments
One strange thing is:
No matter I ran:
or
I got the same result: package bug;
public class Bound {}
package bug;
import qual.A;
public class Bug<@A T extends @A Bound> {} Actual:
and the insertion results are the same as expected. |
topnessman
added a commit
to topnessman/immutability
that referenced
this issue
Jan 19, 2018
Needs this PR is merged, still: https://github.com/opprop/checker- framework-inference/pull/129 This fix also triggered a bug in annotation-tools: typetools/annotation-tools#154
@topnessman This error looks very similar to #155. Can you try whether the fix in #160 also fixes this issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Testcase:
Bound.java
Bug.java
Jaif File:
0.jaif
Command to run:
Console Output:
Expected: no errors
Actual: Got exception
I changed the file order:
Console Output:
Expected: no errors
Bound.java
Bug.java
Actual: no errors
Insertion result is the same as expected.
If I change
T extends Bound
toT extends Object
, insertion result is as expected and there is not error.After running the second command(which is successful), I ran the first command(which failed before) but the result was as expected and there wasn't error anymore. I tried removing
Bound.java
from output directory, and then ran the first command again(the one that had error). This time, I got the same failure result again.Reasoning: it looks like java source file of class type variable's upper bound must exist in output directory to make the whole insertion succeed. The first command succeeded because the second command output
Bound.java
into the output directory, and it was picked up when I ran the first command right after second command. But this would cause trivial ordering when inserting annotation.The text was updated successfully, but these errors were encountered: