@@ -3840,14 +3840,17 @@ NOTE(enum_raw_value_incrementing_from_zero,none,
38403840NOTE(construct_raw_representable_from_unwrapped_value,none,
38413841 " construct %0 from unwrapped %1 value" , (Type, Type))
38423842
3843+ #define EXPORTABILITY_REASON_SELECT " select{" \
3844+ " here|as property wrapper here|" \
3845+ " as result builder here|" \
3846+ " in an extension with public or '@usableFromInline' members|" \
3847+ " in an extension with conditional conformances|" \
3848+ " in a public or '@usableFromInline' conformance|" \
3849+ " in an '@available' attribute here|" \
3850+ " in a property declaration marked public or in a '@frozen' or '@usableFromInline' context}"
3851+
38433852ERROR (decl_from_hidden_module,none,
3844- " cannot use %kind0 %select{here|as property wrapper here|"
3845- " as result builder here|"
3846- " in an extension with public or '@usableFromInline' members|"
3847- " in an extension with conditional conformances|"
3848- " in a public or '@usableFromInline' conformance|"
3849- " in an '@available' attribute here|"
3850- " in a property declaration marked public or in a '@frozen' or '@usableFromInline' context}1; "
3853+ " cannot use %kind0 %" EXPORTABILITY_REASON_SELECT " 1; "
38513854 " %select{%2 has been imported as implementation-only|"
38523855 " it is an SPI imported from %2|"
38533856 " it is SPI|"
@@ -3859,14 +3862,7 @@ ERROR(decl_from_hidden_module,none,
38593862 " %0 is marked '@_implementationOnly'}3" ,
38603863 (const Decl *, unsigned , Identifier, unsigned ))
38613864ERROR(typealias_desugars_to_type_from_hidden_module,none,
3862- " %0 aliases '%1.%2' and cannot be used %select{here|"
3863- " as property wrapper here|"
3864- " as result builder here|"
3865- " in an extension with public or '@usableFromInline' members|"
3866- " in an extension with conditional conformance|"
3867- " in a public or '@usableFromInline' conformance|"
3868- " <<ERROR>>|"
3869- " in a property declaration marked public or in a '@frozen' or '@usableFromInline' context}3 "
3865+ " %0 aliases '%1.%2' and cannot be used %" EXPORTABILITY_REASON_SELECT " 3 "
38703866 " because %select{%4 has been imported as implementation-only|"
38713867 " it is an SPI imported from %4|"
38723868 " <<ERROR>>|"
@@ -3878,12 +3874,7 @@ ERROR(typealias_desugars_to_type_from_hidden_module,none,
38783874 " %0 is marked '@_implementationOnly'}5" ,
38793875 (const TypeAliasDecl *, StringRef, StringRef, unsigned , Identifier, unsigned ))
38803876ERROR(conformance_from_implementation_only_module,none,
3881- " cannot use conformance of %0 to %1 %select{here|as property wrapper here|"
3882- " as result builder here|"
3883- " in an extension with public or '@usableFromInline' members|"
3884- " in an extension with conditional conformances|"
3885- " <<ERROR>>|<<ERROR>>|"
3886- " in a property declaration marked public or in a '@frozen' or '@usableFromInline' context}2; "
3877+ " cannot use conformance of %0 to %1 %" EXPORTABILITY_REASON_SELECT " 2; "
38873878 " %select{%3 has been imported as implementation-only|"
38883879 " the conformance is declared as SPI in %3|"
38893880 " the conformance is declared as SPI|"
0 commit comments