-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Make ImplementsInterfaceOfSelf more precise for canonical subtypes #89969
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
Conversation
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
| return true; | ||
| if (canonicalSubtype) | ||
| { | ||
| // Skip candidates that cannot possibly be the interface of self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main part of the fix. Before this change, we have returned no value even for cases where we could have returned false.
The logic here needs to be at least as precise as the logic in TryResolveConstraintMethodApprox
runtime/src/coreclr/tools/Common/Compiler/TypeExtensions.cs
Lines 454 to 457 in 643087b
| foreach (DefType potentialInterfaceType in canonType.RuntimeInterfaces) | |
| { | |
| if (potentialInterfaceType.ConvertToCanonForm(CanonicalFormKind.Specific) == | |
| interfaceType.ConvertToCanonForm(CanonicalFormKind.Specific)) |
TryResolveConstraintMethodApprox from asserting when compiling potentially needed comparers.
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
All failures are known |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixes #89918