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

Merged
merged 1 commit into from Mar 3, 2017

Conversation

Projects
None yet
4 participants
@slavapestov
Member

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.

AST: Targeted fix for conformance lookup issue
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

This comment has been minimized.

Show comment
Hide comment
@slavapestov

slavapestov Mar 3, 2017

Member

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

Member

slavapestov commented Mar 3, 2017

@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 from AST: Targeted fix for conformance lookup issue to AST: Targeted fix for conformance lookup issue [3.1] Mar 3, 2017

@slavapestov

This comment has been minimized.

Show comment
Hide comment
@slavapestov

slavapestov Mar 3, 2017

Member

@swift-ci Please test

Member

slavapestov commented Mar 3, 2017

@swift-ci Please test

@DougGregor

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.

@kvfi

kvfi approved these changes Mar 3, 2017

@slavapestov

This comment has been minimized.

Show comment
Hide comment
@slavapestov

slavapestov Mar 3, 2017

Member

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

Member

slavapestov commented Mar 3, 2017

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

@tkremenek tkremenek merged commit 845f97d into apple:swift-3.1-branch Mar 3, 2017

4 checks passed

Swift Test Linux Platform 9134 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 46300 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment