Skip to content

[ConstraintSystem] Re-activate constraints if, due to incorrect reference, member type has been bound before base type #36427

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 3 commits into from
Mar 15, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Mar 12, 2021

If member has been bound before the base and the base was
incorrect at that (e.g. fallback to default Any type),
then we need to re-activate all of the constraints
associated with this member reference otherwise some of
the constraints could be left unchecked in inactive state.

This is especially important for key path expressions because
key path constraint can't be retired until all components
are simplified.

Resolves: SR-13364
Resolves: rdar://66706980
Resolves: rdar://74711236

xedin added 3 commits March 12, 2021 09:27
…arify its meaning

New name is `isInKeyPathComponent` since it's implemeneted as a
check for presence of `KeyPathComponent` element in the locator
that covers every sub-element contained in a key path component
as well.
…ence, member type has been bound before base type

If member has been bound before the base and the base was
incorrect at that (e.g. fallback to default `Any` type),
then we need to re-activate all of the constraints
associated with this member reference otherwise some of
the constraints could be left unchecked in inactive state.

This is especially important for key path expressions because
`key path` constraint can't be retired until all components
are simplified.

Resolves: SR-13364
Resolves: rdar://66706980
Resolves: rdar://74711236
@xedin xedin requested a review from hborla March 12, 2021 23:36
@xedin
Copy link
Contributor Author

xedin commented Mar 12, 2021

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Mar 12, 2021

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Mar 14, 2021

@swift-ci please smoke test Linux platform

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