Skip to content

Commit 69e69a7

Browse files
committed
Sema: We might be generic but not have parsed generic parameters
1 parent 7ae4cc6 commit 69e69a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,10 +1005,10 @@ InvertibleAnnotationRequest::evaluate(Evaluator &evaluator,
10051005
// Function to check the generic parameters for an explicit ~TARGET marking
10061006
// which would result in an Inferred ~TARGET marking for this context.
10071007
auto hasInferredInverseTarget = [&](GenericContext *genCtx) -> Mark {
1008-
if (!genCtx->isGeneric())
1008+
auto *gpList = genCtx->getParsedGenericParams();
1009+
if (!gpList)
10091010
return InverseMarking::Mark();
10101011

1011-
auto *gpList = genCtx->getParsedGenericParams();
10121012
llvm::SmallSet<GenericTypeParamDecl*, 4> params;
10131013

10141014
// Scan the inheritance clauses of generic parameters only for an inverse.

0 commit comments

Comments
 (0)