Skip to content
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

fix: isOverriding check with generic throws clause #5117

Merged
merged 1 commit into from
Mar 5, 2023

Conversation

I-Al-Istannen
Copy link
Collaborator

This fixes a small oversight where the cloned throws clause was adapted instead of the original. As the cloned method does not have a parent, lookup of the enclosing type failed and an exception was thrown.

It would likely also be possible to use a method context for the adaption and then try to adapt formal type parameters to the submethod, but that does not make a difference for the overriding check as far as I can see. It would complicate the implementation and be slower though, so I did not do this here.

Closes #5115.

@MartinWitt MartinWitt changed the title review: fix: isOverriding check with generic throws clause fix: isOverriding check with generic throws clause Mar 5, 2023
@MartinWitt MartinWitt merged commit bb15bdc into INRIA:master Mar 5, 2023
@MartinWitt
Copy link
Collaborator

Thanks @I-Al-Istannen

@monperrus monperrus mentioned this pull request Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Usage of type parameters in "throws" clause yields NPE
2 participants