Skip to content

Commit f3c4996

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
1 parent ab0eeb7 commit f3c4996

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
@@ -2873,13 +2873,17 @@ ImportedType ClangImporter::Implementation::importEffectfulPropertyType(
28732873

28742874
// Import the parameter list and result type.
28752875
ParameterList *bodyParams = nullptr;
2876-
ImportedType importedType;
2877-
28782876
auto methodReturnType = importMethodParamsAndReturnType(
28792877
dc, decl, decl->parameters(), false,
28802878
isFromSystemModule, &bodyParams, name,
28812879
asyncConvention, errorConvention, kind);
28822880

2881+
// was there a problem during import?
2882+
if (!methodReturnType)
2883+
return ImportedType();
2884+
2885+
assert(bodyParams);
2886+
28832887
// getter mustn't have any parameters!
28842888
if (bodyParams->size() != 0) {
28852889
return ImportedType();

0 commit comments

Comments
 (0)