Skip to content

Commit ce26094

Browse files
committed
account for errors importing ObjC method as async prop
forgot to check for errors when importing an ObjC method as an async computed property. rdar://109377788 (cherry picked from commit f3c4996)
1 parent 1de0c05 commit ce26094

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/ClangImporter/ImportType.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,13 +2864,17 @@ ImportedType ClangImporter::Implementation::importEffectfulPropertyType(
28642864

28652865
// Import the parameter list and result type.
28662866
ParameterList *bodyParams = nullptr;
2867-
ImportedType importedType;
2868-
28692867
auto methodReturnType = importMethodParamsAndReturnType(
28702868
dc, decl, decl->parameters(), false,
28712869
isFromSystemModule, &bodyParams, name,
28722870
asyncConvention, errorConvention, kind);
28732871

2872+
// was there a problem during import?
2873+
if (!methodReturnType)
2874+
return ImportedType();
2875+
2876+
assert(bodyParams);
2877+
28742878
// getter mustn't have any parameters!
28752879
if (bodyParams->size() != 0) {
28762880
return ImportedType();

0 commit comments

Comments
 (0)