File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1764,11 +1764,7 @@ void WitnessTableBuilderBase::defineAssociatedTypeWitnessTableAccessFunction(
1764
1764
CanType associatedType,
1765
1765
ProtocolConformanceRef associatedConformance) {
1766
1766
bool hasArchetype = associatedType->hasArchetype ();
1767
- OpaqueTypeArchetypeType *associatedRootOpaqueType = nullptr ;
1768
- if (auto assocArchetype = dyn_cast<ArchetypeType>(associatedType)) {
1769
- associatedRootOpaqueType = dyn_cast<OpaqueTypeArchetypeType>(
1770
- assocArchetype->getRoot ());
1771
- }
1767
+ bool isOpaqueArchetype = isa<OpaqueTypeArchetypeType>(associatedType);
1772
1768
1773
1769
assert (isa<NormalProtocolConformance>(Conformance) && " has associated type" );
1774
1770
@@ -1827,7 +1823,7 @@ void WitnessTableBuilderBase::defineAssociatedTypeWitnessTableAccessFunction(
1827
1823
}
1828
1824
1829
1825
// If there are no archetypes, return a reference to the table.
1830
- if (!hasArchetype && !associatedRootOpaqueType ) {
1826
+ if (!hasArchetype && !isOpaqueArchetype ) {
1831
1827
auto wtable = conformanceI->getTable (IGF, &associatedTypeMetadata);
1832
1828
IGF.Builder .CreateRet (wtable);
1833
1829
return ;
You can’t perform that action at this time.
0 commit comments