mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Centralize exportability reason spelling
This commit is contained in:
@@ -3840,14 +3840,17 @@ NOTE(enum_raw_value_incrementing_from_zero,none,
|
||||
NOTE(construct_raw_representable_from_unwrapped_value,none,
|
||||
"construct %0 from unwrapped %1 value", (Type, Type))
|
||||
|
||||
#define EXPORTABILITY_REASON_SELECT "select{" \
|
||||
"here|as property wrapper here|" \
|
||||
"as result builder here|" \
|
||||
"in an extension with public or '@usableFromInline' members|" \
|
||||
"in an extension with conditional conformances|" \
|
||||
"in a public or '@usableFromInline' conformance|" \
|
||||
"in an '@available' attribute here|" \
|
||||
"in a property declaration marked public or in a '@frozen' or '@usableFromInline' context}"
|
||||
|
||||
ERROR(decl_from_hidden_module,none,
|
||||
"cannot use %kind0 %select{here|as property wrapper here|"
|
||||
"as result builder here|"
|
||||
"in an extension with public or '@usableFromInline' members|"
|
||||
"in an extension with conditional conformances|"
|
||||
"in a public or '@usableFromInline' conformance|"
|
||||
"in an '@available' attribute here|"
|
||||
"in a property declaration marked public or in a '@frozen' or '@usableFromInline' context}1; "
|
||||
"cannot use %kind0 %" EXPORTABILITY_REASON_SELECT "1; "
|
||||
"%select{%2 has been imported as implementation-only|"
|
||||
"it is an SPI imported from %2|"
|
||||
"it is SPI|"
|
||||
@@ -3859,14 +3862,7 @@ ERROR(decl_from_hidden_module,none,
|
||||
"%0 is marked '@_implementationOnly'}3",
|
||||
(const Decl *, unsigned, Identifier, unsigned))
|
||||
ERROR(typealias_desugars_to_type_from_hidden_module,none,
|
||||
"%0 aliases '%1.%2' and cannot be used %select{here|"
|
||||
"as property wrapper here|"
|
||||
"as result builder here|"
|
||||
"in an extension with public or '@usableFromInline' members|"
|
||||
"in an extension with conditional conformance|"
|
||||
"in a public or '@usableFromInline' conformance|"
|
||||
"<<ERROR>>|"
|
||||
"in a property declaration marked public or in a '@frozen' or '@usableFromInline' context}3 "
|
||||
"%0 aliases '%1.%2' and cannot be used %" EXPORTABILITY_REASON_SELECT "3 "
|
||||
"because %select{%4 has been imported as implementation-only|"
|
||||
"it is an SPI imported from %4|"
|
||||
"<<ERROR>>|"
|
||||
@@ -3878,12 +3874,7 @@ ERROR(typealias_desugars_to_type_from_hidden_module,none,
|
||||
"%0 is marked '@_implementationOnly'}5",
|
||||
(const TypeAliasDecl *, StringRef, StringRef, unsigned, Identifier, unsigned))
|
||||
ERROR(conformance_from_implementation_only_module,none,
|
||||
"cannot use conformance of %0 to %1 %select{here|as property wrapper here|"
|
||||
"as result builder here|"
|
||||
"in an extension with public or '@usableFromInline' members|"
|
||||
"in an extension with conditional conformances|"
|
||||
"<<ERROR>>|<<ERROR>>|"
|
||||
"in a property declaration marked public or in a '@frozen' or '@usableFromInline' context}2; "
|
||||
"cannot use conformance of %0 to %1 %" EXPORTABILITY_REASON_SELECT "2; "
|
||||
"%select{%3 has been imported as implementation-only|"
|
||||
"the conformance is declared as SPI in %3|"
|
||||
"the conformance is declared as SPI|"
|
||||
|
||||
Reference in New Issue
Block a user