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

review: fix: set declaring type for array field accesses #5206

Merged
merged 1 commit into from
May 13, 2023

Conversation

SirYwell
Copy link
Collaborator

Step 1 addressing #5199.

Previously, spoon set the declaring type to the type of the field if JDT didn't provide a declaring type. From running all tests, this seems to be only the case for access to the length field of arrays. Instead of setting the declaring type to int then, we now use the type binding provided by JDT that holds the actual declaring type.

Note that this does not fully fix the bug, but we get The field java.lang.String[]#length not found instead of The field int#length not found.

@SirYwell SirYwell changed the title wip: fix: set declaring type for array field accesses review: fix: set declaring type for array field accesses May 10, 2023
@SirYwell SirYwell marked this pull request as ready for review May 10, 2023 20:48
Copy link
Collaborator

@monperrus monperrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, LGTM

@MartinWitt MartinWitt merged commit f60d3ee into INRIA:master May 13, 2023
@MartinWitt MartinWitt deleted the fix/array.length-declaringType branch May 13, 2023 09:13
@MartinWitt
Copy link
Collaborator

Thanks @SirYwell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants