Skip to content

modify the Hash of ResolvedTypeWrapper - #3956

Draft
PiIsRational wants to merge 3 commits into
KeYProject:mainfrom
PiIsRational:new-hash
Draft

modify the Hash of ResolvedTypeWrapper#3956
PiIsRational wants to merge 3 commits into
KeYProject:mainfrom
PiIsRational:new-hash

Conversation

@PiIsRational

Copy link
Copy Markdown
Contributor

Intended Change

Modify the Hash and equality functions of ResolvedTypeWrapper, such that Reference Types with the same
qualified name get treated as the same type. This tries to resolve a problem in the current implementation
that also uses the equals and hash methods of the underlying ResolvedType, which can fail in certain cases
for two elements which correspond to the same type. As an example with this change, the test case var-reference-type, which is currently rejected, passes.

Type of pull request

  • Breaking change (fix or feature that would cause existing functionality to change)

Ensuring quality

  • I made sure that introduced/changed code is well documented (javadoc and inline comments).
  • I have tested the feature as follows:
    • I have run the test suite
  • I have checked that runtime performance has not deteriorated.

Additional information and contact(s)

The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.

@WolframPfeifer

Copy link
Copy Markdown
Member

Thanks for this PR, @PiIsRational! Looks like the tests are successful, and I (and apparently also @wadoon) think that the changes make sense. The only thing left would be formatting (you can run the gradle task spotlessJavaApply, to fix that).

If this is ready, you can remove the Draft status.

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.

3 participants