Skip to content

Commit fd41366

Browse files
committed
Allow SwiftFoundation to declare NSObject, too
Fixes rdar://86495060.
1 parent a901892 commit fd41366

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
@@ -8584,7 +8584,8 @@ bool ClassDecl::isNSObject() const {
85848584
if (!getName().is("NSObject")) return false;
85858585
ASTContext &ctx = getASTContext();
85868586
return (getModuleContext()->getName() == ctx.Id_Foundation ||
8587-
getModuleContext()->getName() == ctx.Id_ObjectiveC);
8587+
getModuleContext()->getName() == ctx.Id_ObjectiveC ||
8588+
getModuleContext()->getName().is("SwiftFoundation"));
85888589
}
85898590

85908591
Type ClassDecl::getSuperclass() const {

0 commit comments

Comments
 (0)