Skip to content

[Diagnostics] Special case requirement failures related to return statement/expression #35281

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
Jan 7, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jan 6, 2021

  • Add a new locator path element to track conformance requirements
    to avoid loosing track of source of the conditional requirements introduced
    into the constraint system. Especially important for protocol composition types
    since all of the conformance requirements are anchored at the same locator base.

  • Make sure that "affected" declaration is recognized as the one
    to which result type is attached to if the requirement failure
    is originated in contextual type of return statement/expression.

Resolves: SR-13992
Resolves: rdar://72819046
Resolves: rdar://57789606

xedin added 3 commits January 6, 2021 10:13
…rement

Records protocol requirement associated with a particular type in
the constraint system, also useful to track parent conformance
for conditional requirements.
… conformances and conditional requirements
…tatement/expression

Make sure that "affected" declaration is recognized as the one
to which result type is attached to if the requirement failure
is originated in contextual type of `return` statement/expression.

Resolves: SR-13992
Resolves: rdar://72819046
Resolves: rdar://57789606
@xedin xedin requested a review from hborla January 6, 2021 20:51
@xedin
Copy link
Contributor Author

xedin commented Jan 6, 2021

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Jan 7, 2021

@swift-ci please smoke test Linux platform

@xedin xedin merged commit 33f34d1 into swiftlang:main Jan 7, 2021
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