Skip to content

Commit 5276953

Browse files
committed
Sema: Return ErrorType when resolving '@unchecked Sendable' in protocol inheritance clause
1 parent 0e600d1 commit 5276953

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2619,9 +2619,11 @@ TypeResolver::resolveAttributedType(TypeAttributes &attrs, TypeRepr *repr,
26192619
getDeclContext()->getSelfProtocolDecl()) {
26202620
diagnoseInvalid(repr, attrs.getLoc(TAK_unchecked),
26212621
diag::unchecked_not_inheritance_clause);
2622+
ty = ErrorType::get(getASTContext());
26222623
} else if (!ty->isConstraintType()) {
26232624
diagnoseInvalid(repr, attrs.getLoc(TAK_unchecked),
26242625
diag::unchecked_not_existential, ty);
2626+
ty = ErrorType::get(getASTContext());
26252627
}
26262628

26272629
// Nothing to record in the type. Just clear the attribute.

0 commit comments

Comments
 (0)