mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema] Implement validation of @execution(...) in type context
This commit is contained in:
@@ -8257,10 +8257,14 @@ ERROR(attr_abi_incompatible_with_silgen_name,none,
|
||||
// MARK: @execution Attribute
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
ERROR(attr_execution_concurrent_only_on_async,none,
|
||||
"cannot use '@execution(concurrent)' on non-async %kind0",
|
||||
ERROR(attr_execution_only_on_async,none,
|
||||
"cannot use '@execution' on non-async %kind0",
|
||||
(ValueDecl *))
|
||||
|
||||
ERROR(attr_execution_type_attr_only_on_async,none,
|
||||
"cannot use '@execution' on non-async function type",
|
||||
())
|
||||
|
||||
ERROR(attr_execution_concurrent_incompatible_isolated_parameter,none,
|
||||
"cannot use '@execution(concurrent)' on %kind0 because it has "
|
||||
"an isolated parameter: %1",
|
||||
@@ -8276,6 +8280,19 @@ ERROR(attr_execution_concurrent_incompatible_with_nonisolated,none,
|
||||
"because they serve the same purpose",
|
||||
(ValueDecl *))
|
||||
|
||||
ERROR(attr_execution_concurrent_type_attr_incompatible_with_global_isolation,none,
|
||||
"cannot use '@execution(concurrent)' because function type is "
|
||||
"isolated to global actor %0",
|
||||
(Type))
|
||||
|
||||
ERROR(attr_execution_concurrent_type_attr_incompatible_with_isolated_param,none,
|
||||
"cannot use '@execution(concurrent)' together with isolated parameter",
|
||||
())
|
||||
|
||||
ERROR(attr_execution_concurrent_type_attr_incompatible_with_isolated_any,none,
|
||||
"cannot use '@execution(concurrent)' together with @isolated(any)",
|
||||
())
|
||||
|
||||
|
||||
#define UNDEFINE_DIAGNOSTIC_MACROS
|
||||
#include "DefineDiagnosticMacros.h"
|
||||
|
||||
Reference in New Issue
Block a user