File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
test/Interop/Cxx/objc-correctness Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1147,6 +1147,14 @@ namespace {
11471147 // Do not import namespace declarations marked as 'swift_private'.
11481148 if (decl->hasAttr <clang::SwiftPrivateAttr>())
11491149 return nullptr ;
1150+ // Workaround for os module declaring `namespace os` on Darwin, causing
1151+ // name lookup issues. That namespace only declares utility functions that
1152+ // are not supposed to be used from Swift, so let's just not import the
1153+ // namespace (rdar://119044493).
1154+ if (decl->getIdentifier () && decl->getName () == " os" &&
1155+ decl->getOwningModule () &&
1156+ decl->getOwningModule ()->getTopLevelModuleName () == " os" )
1157+ return nullptr ;
11501158 // If this is a top-level namespace, don't put it in the module we're
11511159 // importing, put it in the "__ObjC" module that is implicitly imported.
11521160 if (!decl->getParent ()->isNamespace ())
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend -typecheck -verify -I %S/Inputs -cxx-interoperability-mode=default %s
2+
3+ // REQUIRES: objc_interop
4+ // REQUIRES: OS=macosx
5+
6+ import os
7+
8+ var _: os . Logger ! = nil
You can’t perform that action at this time.
0 commit comments