-
Notifications
You must be signed in to change notification settings - Fork 139
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
Challenge exception inference #2198
Comments
To recap the role of exception constraints during inference, here's as central statement from 18.2.1:
This helps to explain, why in the above example leaving For the same reason, availability of |
This item from 18.2.5. is incompletely implemented in ecj:
We don't have that 'false' case. |
In 18.2.5. |
Follow-up from #1181, where I tried to create test cases that specifically challenge the interaction of lambda shape analysis and exception inference.
Firstly, I could hardly find any existing test cases in this area.
Secondly, a naive experiment surfaced a few differences to javac that need scrutiny.
Consider the following programm:
(1) Compiled as given above we get:
(2) When we change the type bound of method
getEx()
toextends IOException
then:(3) When we change the same type bound to
extends IllegalAccessError
then:For (1) compilers are well aligned. But (2) and (3) show that ecj's inference accepts the program and leaves it to downstream phases to detect resulting errors, whereas javac succeeds to connect the respective problem to inference.
The text was updated successfully, but these errors were encountered: