Conversation
`resolveMemberType` returned any non-private member type that it found in a supertype. A package-private member type is inherited only within its own package, so a package-private member type of a supertype in a different package was wrongly returned. Also, a declaration hides what its declaring type would otherwise inherit even when the declaration itself is not inherited, so the search must not continue past it into that type's supertypes. Either error made `annotationIsRelevant` ask about the wrong type, which could discard a relevant annotation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…-fork-mernst-branch-resolve-type-name-member-scope into resolve-member-type-inheritance
…-fork-mernst-branch-resolve-type-name-member-scope into resolve-member-type-inheritance
…-fork-mernst-branch-resolve-type-name-member-scope into resolve-member-type-inheritance
…-fork-mernst-branch-resolve-type-name-member-scope into resolve-member-type-inheritance
…-fork-mernst-branch-resolve-type-name-member-scope into resolve-member-type-inheritance
…-fork-mernst-branch-resolve-type-name-member-scope into resolve-member-type-inheritance
…-fork-mernst-branch-resolve-type-name-member-scope into resolve-member-type-inheritance
`typeIsRelevant` called the 3-arg `JavaParserUtil.typeToTypeMirror`, which allocates a fresh cache per call, leaving `typeElementCache` unused. Pass the field to the 4-arg overload. In `extract-annotations` and `insert-annotations`, `AFU` silently became empty if the `cd`/`pwd` failed; fail there instead of at the eventual `java` call. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #8186. With this merged, the stack is equivalent to #8177, which can then be closed.
resolveMemberTypereturned any non-private member type that it found in a supertype. Two errors:Either error made
annotationIsRelevantask about the wrong type, which could discard a relevant annotation.Adds
PackagePrivateNotInheritedplus anotherpackagesubdirectory -- the firstainfer-relevancetest input in a named package -- and generalizesAinferRelevanceAjavaGenerationTestto name a goal file after the class's fully-qualified name.🤖 Generated with Claude Code