File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
lib/SILOptimizer/Analysis Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,12 @@ class NominalTypeWalker : public ASTWalker {
37
37
bool walkToDeclPre (Decl *D) override {
38
38
// / (1) Walk over all NominalTypeDecls to determine conformances.
39
39
if (auto *NTD = dyn_cast<NominalTypeDecl>(D)) {
40
- auto Protocols = NTD->getAllProtocols ();
41
- for (auto &Protocol : Protocols) {
42
- if (Protocol->getEffectiveAccess () <= AccessLevel::Internal) {
43
- ProtocolConformanceCache[Protocol].push_back (NTD);
40
+ if (!isa<ProtocolDecl>(NTD)) {
41
+ auto Protocols = NTD->getAllProtocols ();
42
+ for (auto &Protocol : Protocols) {
43
+ if (Protocol->getEffectiveAccess () <= AccessLevel::Internal) {
44
+ ProtocolConformanceCache[Protocol].push_back (NTD);
45
+ }
44
46
}
45
47
}
46
48
}
You can’t perform that action at this time.
0 commit comments