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 polluted CompareState when comparing element types in a signature #98198

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Feb 9, 2024

We were propagating state from each type in the method signature to the comparisons for the next type. This resulted in type equivalence checks being disabled for any parameters that came after a generic parameter.

See #96268
This regressed in .NET 8.0 after #86932. We probably want to backport, as there isn't really a workaround other than rewriting method signatures.

We were propagating state from each type in the method signature to the
comparisons for the next type. This resulted in type equivalence checks
being disabled for any parameters that came after a generic parameter.
@elinor-fung elinor-fung marked this pull request as ready for review February 9, 2024 04:31
@AaronRobinsonMSFT
Copy link
Member

I assume the "See" issue can be converted to a "Fixes"?

@elinor-fung
Copy link
Member Author

elinor-fung commented Feb 9, 2024

I switched it to 'See' instead of 'Fixes' because wanted to keep it open for a .NET 8 backport.

@elinor-fung elinor-fung merged commit 6441968 into dotnet:main Feb 9, 2024
119 of 121 checks passed
@elinor-fung elinor-fung deleted the fix96268 branch February 9, 2024 21:57
@elinor-fung
Copy link
Member Author

/backport to release/8.0-staging

Copy link
Contributor

github-actions bot commented Feb 9, 2024

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/7850043335

Copy link
Contributor

github-actions bot commented Feb 9, 2024

@elinor-fung backporting to release/8.0-staging failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix polluted CompareState when comparing element types in a signature
Applying: Add test
Using index info to reconstruct a base tree...
M	src/tests/baseservices/typeequivalence/impl/Impls.cs
M	src/tests/baseservices/typeequivalence/simple/Simple.cs
Falling back to patching base and 3-way merge...
Auto-merging src/tests/baseservices/typeequivalence/simple/Simple.cs
CONFLICT (content): Merge conflict in src/tests/baseservices/typeequivalence/simple/Simple.cs
Auto-merging src/tests/baseservices/typeequivalence/impl/Impls.cs
CONFLICT (content): Merge conflict in src/tests/baseservices/typeequivalence/impl/Impls.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Add test
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

github-actions bot commented Feb 9, 2024

@elinor-fung an error occurred while backporting to release/8.0-staging, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

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

Successfully merging this pull request may close these issues.

2 participants