Skip to content

Teach IRGen to fulfill type parameters from class-constrained archetypes #12118

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

Conversation

slavapestov
Copy link
Contributor

This is just some preliminary plumbing for fixing https://bugs.swift.org/browse/SR-617 / rdar://problem/33690383.

…-constrained 'self' archetypes

Right now witness_method functions either have a concrete type as the
'self' argument or a type parameter with a single protocol conformance
constraint.

Soon we will also have class-constrained archetypes here, so tweak the
assertion here to detect this case.
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@rjmccall Does this look reasonable? I need this ultimately so that @convention(witness_method) <T, U, V where T : SomeClass<U, V>> (..., @owned T) -> () has the right polymorphic signature. The next step is to give witness thunks this signature when the conforming type is a class and the witness is defined in a protocol extension. This will fix the problem where the Self type is wrong.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 15bbf2c

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 15bbf2c

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

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