We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ecc05d + a22f57b commit 64e9d0bCopy full SHA for 64e9d0b
lib/ClangImporter/ImportType.cpp
@@ -2817,9 +2817,10 @@ ImportedType ClangImporter::Implementation::importMethodParamsAndReturnType(
2817
if (kind == SpecialMethodKind::NSDictionarySubscriptGetter &&
2818
paramTy->isObjCIdType()) {
2819
// Not using `getImportTypeAttrs()` is unprincipled but OK for this hack.
2820
- swiftParamTy = ExistentialType::get(SwiftContext.getNSCopyingType());
2821
- if (!swiftParamTy)
+ auto nsCopying = SwiftContext.getNSCopyingType();
+ if (!nsCopying)
2822
return {Type(), false};
2823
+ swiftParamTy = ExistentialType::get(nsCopying);
2824
if (optionalityOfParam != OTK_None)
2825
swiftParamTy = OptionalType::get(swiftParamTy);
2826
0 commit comments