diff --git a/lib/ClangImporter/ImportType.cpp b/lib/ClangImporter/ImportType.cpp index 5fb4f4f766459..c5a720c4a32f0 100644 --- a/lib/ClangImporter/ImportType.cpp +++ b/lib/ClangImporter/ImportType.cpp @@ -2864,13 +2864,17 @@ ImportedType ClangImporter::Implementation::importEffectfulPropertyType( // Import the parameter list and result type. ParameterList *bodyParams = nullptr; - ImportedType importedType; - auto methodReturnType = importMethodParamsAndReturnType( dc, decl, decl->parameters(), false, isFromSystemModule, &bodyParams, name, asyncConvention, errorConvention, kind); + // was there a problem during import? + if (!methodReturnType) + return ImportedType(); + + assert(bodyParams); + // getter mustn't have any parameters! if (bodyParams->size() != 0) { return ImportedType();