Java: Test generator fixes#12242
Merged
Merged
Conversation
Contributor
joefarebrother
commented
Feb 17, 2023
- Revert previous change (in Java: Test generator improvements #12195) to constructor return types; as constructors are supposed to be modeled using Argument[-1] rather than ReturnValue
- Fix generation of ambiguous calls when one of the conflicting methods is overridden
- Revert previous change to constructor return values; as constructors are supposed to be modeled using Argument[-1] rather than ReturnValue - Fix generation of ambiguous calls when one of the conflicting methods is overridden
atorralba
reviewed
Feb 20, 2023
| exists(Callable other, string package, string type, string name | | ||
| c.hasQualifiedName(package, type, name) and | ||
| exists(Callable other, Callable override, string package, string type, string name | | ||
| override = [c, c.(Method).getASourceOverriddenMethod*()] and |
Contributor
There was a problem hiding this comment.
Since you're using the reflexive transitive closure here, I think you don't need to add c, it should be included by c.(Method).getASourceOverriddenMethod*() already:
Suggested change
| override = [c, c.(Method).getASourceOverriddenMethod*()] and | |
| override = c.(Method).getASourceOverriddenMethod*() and |
Contributor
Author
There was a problem hiding this comment.
c can also be a Constructor, which diesn't have getASourceOverridenMethod, so I think c is still necassary for that case.
Contributor
There was a problem hiding this comment.
(Maybe using the non-reflexive transitive closure would be a bit clearer then, but anyway)
atorralba
approved these changes
Feb 20, 2023
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.