Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/ClangImporter/ImportType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,12 +949,13 @@ namespace {
}

// Determine whether this Objective-C class type is bridged to
// a Swift type.
// a Swift type. Hardcode "NSString" since it's referenced from
// the ObjectiveC module (a level below Foundation).
Type bridgedType;
if (auto objcClassDef = objcClass->getDefinition())
bridgedType = mapSwiftBridgeAttr(objcClassDef);
else
bridgedType = mapSwiftBridgeAttr(objcClass);
else if (objcClass->getName() == "NSString")
bridgedType = Impl.SwiftContext.getStringDecl()->getDeclaredType();

if (bridgedType) {
// Gather the type arguments.
Expand Down