Skip to content

[AST/Sema] NonCopyableGenerics: Address some of the request circularity issues #71659

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 16 commits into from
Feb 20, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 15, 2024

  • Extract logic related to protocol handling out of InvertibleAnnotationRequest
  • Don't resolve requirements that don't have inverse as a constraint

@xedin xedin force-pushed the noncopyable-circularity-fixes branch from 4f493a4 to f53d7a2 Compare February 15, 2024 21:14
@xedin
Copy link
Contributor Author

xedin commented Feb 15, 2024

@swift-ci please test

@xedin xedin requested a review from tshortli as a code owner February 16, 2024 01:07
@xedin
Copy link
Contributor Author

xedin commented Feb 16, 2024

@swift-ci please test

2 similar comments
@xedin
Copy link
Contributor Author

xedin commented Feb 16, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Feb 16, 2024

@swift-ci please test

xedin added 16 commits February 16, 2024 17:55
…traint is an `InverseTypeRepr`

This avoid a cycle in recursive and invalid code where one of the
requirements references the subject type.
The method only needs to know about the presence of inverses
for the given invertiable protocol.
…rking`

The first step on the path to dismangle `TypeDecl::getMarking()`.
Introduce `NominalTypeDecl::has{Marking, InverseMarking}` methods
that split the logic from `InvertibleAnnotationRequest`
…Decl::hasInverseMarking`

TypeRepr for the subject should be already bound to a generic type
declaration, so there is no need to resolve the requirement to
check that.
…ciated type declarations

This is required for `ASTPrinter` to wrap the protocol that has
associated type with inverses in a feature block.
@xedin xedin force-pushed the noncopyable-circularity-fixes branch from 9ebc57f to b6af269 Compare February 19, 2024 21:04
@xedin
Copy link
Contributor Author

xedin commented Feb 19, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Feb 19, 2024

Please test with following pull request:
swiftlang/swift-docc#836

@swift-ci please test Linux platform

@xedin
Copy link
Contributor Author

xedin commented Feb 20, 2024

@swift-ci please test Linux

@xedin
Copy link
Contributor Author

xedin commented Feb 20, 2024

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Feb 20, 2024

@swift-ci please clean test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Feb 20, 2024

@swift-ci please smoke test macOS platform

@xedin xedin merged commit 11ef6e5 into swiftlang:main Feb 20, 2024
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