mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
DocSupport: don't assume we've printed the first extension when merging several together. rdar://39887195
When printing the content of several extensions into a synthesized one, we shouldn't assume the first extension in the group always gets printed.
This commit is contained in:
@@ -209,6 +209,7 @@ public:
|
||||
initDefaultMapToUse(D);
|
||||
// If D is declared in the extension, then the synthesized target is valid.
|
||||
TypeOrExtensionDecl SynthesizedTarget;
|
||||
assert(D->getDeclContext()->isModuleScopeContext() == EntitiesStack.empty());
|
||||
if (D->getDeclContext() == SynthesizedExtensionInfo.first)
|
||||
SynthesizedTarget = SynthesizedExtensionInfo.second;
|
||||
EntitiesStack.emplace_back(D, SynthesizedTarget,
|
||||
|
||||
Reference in New Issue
Block a user