File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 74cfb32a3d5e9f84a558d8a01c2f9dd9d9d8f54b
2
+ refs/heads/master: 8177651ebe0984f0d81cd1db53cb1c7821570693
3
3
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
Original file line number Diff line number Diff line change @@ -114,19 +114,21 @@ ProtocolConformanceRef::subst(Type origType,
114
114
115
115
auto *proto = getRequirement ();
116
116
117
+ // If the type is an existential, it must be self-conforming.
118
+ if (substType->isExistentialType ()) {
119
+ auto optConformance =
120
+ proto->getModuleContext ()->lookupExistentialConformance (substType, proto);
121
+ assert (optConformance && " existential type didn't self-conform" );
122
+ return *optConformance;
123
+ }
124
+
117
125
// Check the conformance map.
118
126
if (auto result = conformances (origType->getCanonicalType (),
119
127
substType, proto)) {
120
128
return *result;
121
129
}
122
130
123
- // The only remaining case is that the type is an existential that
124
- // self-conforms.
125
- assert (substType->isExistentialType ());
126
- auto optConformance =
127
- proto->getModuleContext ()->lookupExistentialConformance (substType, proto);
128
- assert (optConformance && " existential type didn't self-conform" );
129
- return *optConformance;
131
+ llvm_unreachable (" Invalid conformance substitution" );
130
132
}
131
133
132
134
Type
You can’t perform that action at this time.
0 commit comments