[SE-0497] Implement @export attribute syntax

Implement the @export(implementation) and @export(interface) attributes
to replace @_alwaysEmitIntoClient and @_neverEmitIntoClient. Provide a
warning + Fix-It to start staging out the very-new
@_neverEmitIntoClient. We'll hold off on pushing folks toward
@_alwaysEmitIntoClient for a little longer.
This commit is contained in:
Doug Gregor
2025-11-07 16:20:43 -08:00
parent ed85a12b59
commit 020b69d4b6
40 changed files with 403 additions and 139 deletions

View File

@@ -4170,6 +4170,10 @@ ERROR(final_not_allowed_here,none,
"'final' may only be applied to classes, properties, methods, and "
"subscripts", ())
ERROR(attr_incompatible_with_attr,none,
"'%0' cannot be used with '%1'",
(DeclAttribute, DeclAttribute))
ERROR(attr_incompatible_with_non_final,none,
"'%0' cannot be applied to a non-final %kindonly1",
(DeclAttribute, const ValueDecl *))
@@ -5369,7 +5373,7 @@ GROUPED_ERROR(opaque_type_unsupported_availability,OpaqueTypeInference,none,
"a default argument value|" \
"a property initializer in a '@frozen' type|" \
"a '@backDeployed' function|" \
"an embedded function not marked '@_neverEmitIntoClient'}"
"an embedded function not marked '@export(interface)'}"
ERROR(discard_wrong_context_decl,none,
"'discard' statement cannot appear in %kindonly0",