Skip to content

AST: Start returning SelfProtocolConformances from ModuleDecl::lookupConformance() #24083

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
Apr 17, 2019

Conversation

slavapestov
Copy link
Contributor

Fixes rdar://problem/49241923, https://bugs.swift.org/browse/SR-10015.

@slavapestov slavapestov requested a review from rjmccall April 17, 2019 03:03
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

CoreStore failed to build but it's extremely unlikely it was my change:

In file included from /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-debug/project_cache/CoreStore/Sources/CoreStoreBridge.m:29:
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-debug/project_cache/CoreStore/build/Build/Products/Debug-iphoneos/CoreStore.framework/Headers/CoreStore-Swift.h:3422:158: warning: missing terminating '"' character [-Winvalid-pp-token]
- (nonnull instancetype)initWithModel:(NSManagedObjectModel * _Nonnull)model versionChain:(NSArray<NSString *> * _Nullable)versionChain SWIFT_DEPRECATED_MSG("Use the -[initWit
                                                                                                                                                             ^
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-debug/project_cache/CoreStore/build/Build/Products/Debug-iphoneos/CoreStore.framework/Headers/CoreStore-Swift.h:1:2: error: unterminated conditional directive
#if 0
 ^
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-debug/project_cache/CoreStore/Sources/CoreStoreBridge.m:32:2: error: embedding a #pragma directive within macro arguments is not supported

#pragma mark - Clauses
 ^

@slavapestov slavapestov merged commit 4ab605e into swiftlang:master Apr 17, 2019
Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

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

LGTM. As I mentioned elsewhere, there's an invariant that the conforming type of a conformance should match the corresponding type in whatever substitution it appears in, so we should generalize SelfProtocolConformance so that it can apply to protocol compositions and/or base protocols, but otherwise this is the right basic approach.

Is there any way we can verify that abstract ProtocolConformanceRefs are only being used for archetypes and similar constructs?

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