Skip to content

Commit ba497c2

Browse files
committed
Sema: Don't remove nonisolated attribute when we diagnose it as invalid on 'lazy'
Fixes rdar://141967932.
1 parent 5bcb696 commit ba497c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7449,7 +7449,7 @@ void AttributeChecker::visitNonisolatedAttr(NonisolatedAttr *attr) {
74497449
}
74507450

74517451
if (var->getAttrs().hasAttribute<LazyAttr>()) {
7452-
diagnoseAndRemoveAttr(attr, diag::nonisolated_lazy)
7452+
diagnose(attr->getLocation(), diag::nonisolated_lazy)
74537453
.warnUntilSwiftVersion(6);
74547454
return;
74557455
}

0 commit comments

Comments
 (0)