Skip to content

Allow @isolated(any) mismatches in witness matching. #72641

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

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

rjmccall
Copy link
Contributor

Fixes rdar://125394096

@rjmccall rjmccall requested review from hborla and xedin as code owners March 27, 2024 23:19
@rjmccall
Copy link
Contributor Author

@swift-ci Please test

I'm not really convinced that this shouldn't be done by introducing a new
kind of constraint rather than hacking in what are essentially conversions
as "bind" constraints, but this is the most direct path for now.

Fixes rdar://125394096
@rjmccall rjmccall force-pushed the isolated-any-witness-mismatch branch from 8c2c1a0 to b773c49 Compare March 28, 2024 06:12
@rjmccall
Copy link
Contributor Author

@swift-ci Please test

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for fixing typos!

@@ -3041,6 +3041,13 @@ matchFunctionThrowing(ConstraintSystem &cs,
}
}

static bool isWitnessMatching(ConstraintLocatorBuilder locator) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: would be great to make it a method on ConstraintLocatorBuilder because it could be made more efficient there.

@rjmccall rjmccall merged commit 2f44b0a into swiftlang:main Mar 28, 2024
@rjmccall rjmccall deleted the isolated-any-witness-mismatch branch March 28, 2024 18:40
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.

2 participants