Merge pull request #75093 from DougGregor/unsafe-inherit-executor-vs-pound-isolation

Ensure that a `@_unsafeInheritExecutor` function does not depend on `#isolation`
This commit is contained in:
Doug Gregor
2024-07-10 11:05:37 -07:00
committed by GitHub
13 changed files with 448 additions and 14 deletions

View File

@@ -3997,6 +3997,12 @@ ERROR(reasync_without_async_parameter,none,
ERROR(inherits_executor_without_async,none,
"non-async functions cannot inherit an executor", ())
ERROR(isolation_in_inherits_executor,none,
"#isolation%select{| (introduced by a default argument)}0 cannot be used "
"within an '@_unsafeInheritExecutor' function", (bool))
ERROR(unsafe_inherits_executor_deprecated,none,
"@_unsafeInheritExecutor attribute is deprecated; consider an "
"'isolated' parameter defaulted to '#isolation' instead", ())
ERROR(lifetime_invalid_global_scope,none, "%0 is only valid on methods",
(DeclAttribute))