Skip to content

Commit 78aa68e

Browse files
committed
Allow SwiftFoundation to declare NSObject, too
Fixes rdar://86495060. (cherry picked from commit fd41366)
1 parent 743aa79 commit 78aa68e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/AST/Decl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8589,7 +8589,8 @@ bool ClassDecl::isNSObject() const {
85898589
if (!getName().is("NSObject")) return false;
85908590
ASTContext &ctx = getASTContext();
85918591
return (getModuleContext()->getName() == ctx.Id_Foundation ||
8592-
getModuleContext()->getName() == ctx.Id_ObjectiveC);
8592+
getModuleContext()->getName() == ctx.Id_ObjectiveC ||
8593+
getModuleContext()->getName().is("SwiftFoundation"));
85938594
}
85948595

85958596
Type ClassDecl::getSuperclass() const {

0 commit comments

Comments
 (0)