File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,19 @@ static bool isInterestingTypealias(Type type) {
322
322
return false ;
323
323
if (type->is <BuiltinType>())
324
324
return false ;
325
+
326
+ auto underlyingTy = aliasTy->getDecl ()->getUnderlyingTypeLoc ().getType ();
327
+
328
+ // A typealias that directly points at Builtin.AnyObject is not
329
+ // 'interesting', since it is in fact the AnyObject typealias in
330
+ // the standard library.
331
+ if (underlyingTy->isAnyObject () &&
332
+ isa<ProtocolCompositionType>(underlyingTy.getPointer ()))
333
+ return false ;
334
+
325
335
if (aliasTy->getDecl ()->isCompatibilityAlias ())
326
- return isInterestingTypealias (aliasTy->getSinglyDesugaredType ());
336
+ return isInterestingTypealias (underlyingTy);
337
+
327
338
return true ;
328
339
}
329
340
You can’t perform that action at this time.
0 commit comments