diff --git a/lib/ClangImporter/ImportType.cpp b/lib/ClangImporter/ImportType.cpp index 1c1393cde1a5e..58d31100898af 100644 --- a/lib/ClangImporter/ImportType.cpp +++ b/lib/ClangImporter/ImportType.cpp @@ -2873,13 +2873,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();