Skip to content

Commit c12e062

Browse files
authored
Merge pull request #21506 from DougGregor/dynamic-replacement-ambiguity-cleanup
2 parents 960ef61 + d2ddbc8 commit c12e062

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,8 +2068,8 @@ static Type getDynamicComparisonType(ValueDecl *value) {
20682068
}
20692069

20702070
auto interfaceType = value->getInterfaceType();
2071-
if (interfaceType->hasError())
2072-
return interfaceType;
2071+
if (!interfaceType)
2072+
return ErrorType::get(value->getASTContext());
20732073

20742074
return interfaceType->removeArgumentLabels(numArgumentLabels);
20752075
}

0 commit comments

Comments
 (0)