Skip to content
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

AST: Targeted fix for conformance lookup issue [3.1] #7887

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Mar 3, 2017

When substituting a type like T.A.B where A and B are
associated types and the conformance requirement on T.A
is implied by conformance requirements on T, we would
crash.

The problem is that we have no way of representing an
abstract conformance with nested concrete types.

This patch adds a workaround.

Fixes rdar://problem/30737546,
https://bugs.swift.org/browse/SR-3500 and https://bugs.swift.org/browse/SR-4088.

I'm going to keep 3500 open to track fixing the issue on master, but close the other dupes of this.

When substituting a type like T.A.B where A and B are
associated types and the conformance requirement on T.A
is implied by conformance requirements on T, we would
crash.

The problem is that we have no way of representing an
abstract conformance with nested concrete types.

This patch adds a workaround.

Fixes <rdar://problem/30737546> and
<https://bugs.swift.org/browse/SR-3500>.
@slavapestov
Copy link
Contributor Author

@DougGregor I'd like to put something like this into 3.1 since lookupConformance() is even more broken there than on master.

@slavapestov slavapestov changed the title AST: Targeted fix for conformance lookup issue AST: Targeted fix for conformance lookup issue [3.1] Mar 3, 2017
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Yeah, this looks like a good fallback for 3.1. Let's make sure to keep all of these tests on master to get fixed the right way.

@slavapestov
Copy link
Contributor Author

The test I'm adding here is already on master.

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.

None yet

4 participants