Skip to content

Commit 36551e3

Browse files
committed
LifetimeDependence type checking: avoid an assertion on error.
When the type checker encounters incomplete type error, bail out early to avoid an assertion.
1 parent 0083f09 commit 36551e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/LifetimeDependence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ class LifetimeDependenceChecker {
954954
Type paramTypeInContext =
955955
afd->mapTypeIntoContext(param->getInterfaceType());
956956
if (paramTypeInContext->hasError()) {
957-
continue;
957+
return;
958958
}
959959
auto kind = inferLifetimeDependenceKind(paramTypeInContext,
960960
param->getValueOwnership());

0 commit comments

Comments
 (0)