@@ -179,7 +179,7 @@ struct SynthesizedExtensionAnalyzer::Implementation {
179
179
}
180
180
};
181
181
182
- bool HasDocComment ;
182
+ bool Unmergable ;
183
183
unsigned InheritsCount;
184
184
std::set<Requirement> Requirements;
185
185
void addRequirement (GenericSignature *GenericSig,
@@ -194,14 +194,14 @@ struct SynthesizedExtensionAnalyzer::Implementation {
194
194
}
195
195
bool operator == (const ExtensionMergeInfo& Another) const {
196
196
// Trivially unmergeable.
197
- if (HasDocComment || Another.HasDocComment )
197
+ if (Unmergable || Another.Unmergable )
198
198
return false ;
199
199
if (InheritsCount != 0 || Another.InheritsCount != 0 )
200
200
return false ;
201
201
return Requirements == Another.Requirements ;
202
202
}
203
203
bool isMergeableWithTypeDef () {
204
- return !HasDocComment && InheritsCount == 0 && Requirements.empty ();
204
+ return !Unmergable && InheritsCount == 0 && Requirements.empty ();
205
205
}
206
206
};
207
207
@@ -279,7 +279,8 @@ struct SynthesizedExtensionAnalyzer::Implementation {
279
279
ExtensionDecl *EnablingExt, NormalProtocolConformance *Conf) {
280
280
SynthesizedExtensionInfo Result (IsSynthesized, EnablingExt);
281
281
ExtensionMergeInfo MergeInfo;
282
- MergeInfo.HasDocComment = !Ext->getRawComment ().isEmpty ();
282
+ MergeInfo.Unmergable = !Ext->getRawComment ().isEmpty () || // With comments
283
+ Ext->getAttrs ().hasAttribute <AvailableAttr>(); // With @available
283
284
MergeInfo.InheritsCount = countInherits (Ext);
284
285
285
286
// There's (up to) two extensions here: the extension with the items that we
0 commit comments