File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -323,16 +323,18 @@ static bool isInterestingTypealias(Type type) {
323
323
if (type->is <BuiltinType>())
324
324
return false ;
325
325
326
- auto underlyingTy = aliasTy->getDecl ()-> getUnderlyingTypeLoc (). getType ();
326
+ auto aliasDecl = aliasTy->getDecl ();
327
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 ()))
328
+ // The 'Swift.AnyObject' typealias is not 'interesting'.
329
+ if (aliasDecl->getName () ==
330
+ aliasDecl->getASTContext ().getIdentifier (" AnyObject" ) &&
331
+ aliasDecl->getParentModule ()->isStdlibModule ()) {
333
332
return false ;
333
+ }
334
+
335
+ auto underlyingTy = aliasDecl->getUnderlyingTypeLoc ().getType ();
334
336
335
- if (aliasTy-> getDecl () ->isCompatibilityAlias ())
337
+ if (aliasDecl ->isCompatibilityAlias ())
336
338
return isInterestingTypealias (underlyingTy);
337
339
338
340
return true ;
You can’t perform that action at this time.
0 commit comments