Skip to content

[CSBindings] Don't infer subtypes/supertype bindings for a closure type #37292

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 1 commit into from
May 7, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 6, 2021

A type representing a closure expression is always bound to its
"inferred" type based on the body, so contextual bindings just
serve as a trigger to "resolve" a closure. Let's not attempt any
subtype/supertype inference for a type variable representing a
closure since if "direct" bindings have failed, it wouldn't be bound
to such types regardless.

Resolves: rdar://problem/77022842

A type representing a closure expression is always bound to its
"inferred" type based on the body, so contextual bindings just
serve as a trigger to "resolve" a closure. Let's not attempt any
subtype/supertype inference for a type variable representing a
closure since if "direct" bindings have failed, it wouldn't be bound
to such types regardless.

Resolves: rdar://problem/77022842
@xedin xedin requested a review from hborla May 6, 2021 20:36
@xedin xedin force-pushed the rdar-77022842 branch from 7bc0bd8 to 3c0388d Compare May 6, 2021 20:36
@xedin
Copy link
Contributor Author

xedin commented May 6, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented May 6, 2021

Build failed
Swift Test Linux Platform
Git Sha - 3c0388d

@xedin
Copy link
Contributor Author

xedin commented May 6, 2021

@swift-ci please test Linux platform

@xedin
Copy link
Contributor Author

xedin commented May 6, 2021

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented May 7, 2021

@shahmishal A lot of debug suite projects failed due to:

xcodebuild: error: Initialization failed.
	Reason: Loading a plug-in failed.

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.

3 participants