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