Skip to content

RequirementMachine: Another silly GenericSignatureBuilder compatibility hack for concrete contraction #41935

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

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov slavapestov force-pushed the rqm-concrete-contraction-unrelated-alias branch from d7bb4db to dc82433 Compare March 21, 2022 20:31
@slavapestov
Copy link
Contributor Author

@xedin This should fix the source compatibility test failure.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit ac7efc1 into swiftlang:main Mar 22, 2022
@@ -0,0 +1,48 @@
// R/UN: %target-swift-frontend -typecheck %s -debug-generic-signatures -requirement-machine-inferred-signatures=on 2>&1 | %FileCheck %s
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this RUN line disabled deliberately?

Comment on lines +24 to +28
init<Proxy: DelegateProxyType>(_: Proxy.Type)
where Proxy: GenericDelegateProxy<P, D>,
Proxy.Parent == P,
Proxy.Delegate == D {}
}
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis Mar 24, 2022

Choose a reason for hiding this comment

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

Trying to wrap my head around this. If the class is unrelated to the protocol, and the Proxy subclass could have its own distinct witnesses for these associated types, why would it be correct to substitute GenericDelegateProxy<P, D> into Proxy.Parent == P and discard the requirement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the test in #42005

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