Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Aug 3, 2023

Fixes #89918

@ghost ghost assigned jkotas Aug 3, 2023
@ghost
Copy link

ghost commented Aug 3, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #89918

Author: jkotas
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

return true;
if (canonicalSubtype)
{
// Skip candidates that cannot possibly be the interface of self
Copy link
Member Author

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

foreach (DefType potentialInterfaceType in canonType.RuntimeInterfaces)
{
if (potentialInterfaceType.ConvertToCanonForm(CanonicalFormKind.Specific) ==
interfaceType.ConvertToCanonForm(CanonicalFormKind.Specific))
to prevent TryResolveConstraintMethodApprox from asserting when compiling potentially needed comparers.

@jkotas
Copy link
Member Author

jkotas commented Aug 4, 2023

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkotas
Copy link
Member Author

jkotas commented Aug 4, 2023

All failures are known

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jkotas jkotas merged commit 9c06438 into dotnet:main Aug 4, 2023
@jkotas jkotas deleted the issue-89918 branch August 4, 2023 05:50
@ghost ghost locked as resolved and limited conversation to collaborators Sep 3, 2023
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.

potentialMatchingInterfaces != 0 assertion when compiling comparers

2 participants