-
Notifications
You must be signed in to change notification settings - Fork 352
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
error: AsSuperVisitor: type is not an erased subtype of supertype. #6753
Comments
Can you please provide the source code (or a minimized version, if it contains secret IP)? Without that, it is very hard for us to understand and reproduce the problem. |
It is a huge code base that i can't share. And I have no idea where the error is coming from. So I can't create sample project project to reproduce it. Is there a way to figure where the error is coming from? |
I understand. Maven has known bugs regarding not displaying certain warnings. I'm not positive that is the problem here, but it would be helpful to rule it out. Could you please run There are some Checker Framework command-line arguments you can supply, within or outside Maven:
I hope this helps. |
Not sure if you tried it already but it looks like there is an |
We've been working on an experimental tool that can generate a small test case from your huge code base, if you can locate the part of the program (e.g., the method) that triggers the crash. This new tool is available here: https://github.com/njit-jerse/specimin. I'd love to know if you find it helpful for generating a reproducer for this crash you're experiencing, and if you decide to give it a try and run into any trouble I'd be happy to provide support. |
I have the following argument In the command Running it gives Removing "lombok.launch.AnnotationProcessorHider$AnnotationProcessor" gives
If I remove the entire '-processor' |
Tried that. Gives no hint
|
I guess I have to first find the error source |
I noticed that it fails with 3.45.0 and 3.46.0. |
I had the same error and was able to compile successfully just now. Following code causes issues:
and I had to explicitly add the type information to Just as context, IntelliJ had the same issue for a while where I was told that a cast is needed but The actual code had more nesting so this is a simplified example. If it's not helpful like this I need to invest time to extract the error case I had. |
I created a small test case from this code snippet:
And it doesn't cause a crash. I had to guess at the signature of But in general adding explicit type argument may be a work around for a crash like this. |
This represents the code in question on my end:
It is working with these casts/explicit type parameters:
|
I finally got the issue fixed.
The fix was to specify the linkedhashmap type
Thanks @michelkaeser for the hint. |
Sorry it was so difficult to find the code that was causing the crash. Checker Framework exception messages do print which line caused the crash, but it is not in the first line. I've added an option, I've also made changes so that this sort of crash will cause an error message rather than crashing. That way you can just suppress the warning. Both these changes should be in the Sept. 3rd release. I'm also working to fix the bugs in the type argument inference code and will make sure these test case pass. Thanks for reporting these issues and all the effort to make testcases! |
Upgraded checker framework to 3.46.0. Seeing lots of failures with detail except one. I have temporarily suppressed other errors.
There is no reference to it anywhere in the log. Tried with -X. Still Nothing.
How do figure out where the error is coming from?
The text was updated successfully, but these errors were encountered: