@@ -3840,14 +3840,18 @@ 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+ " in a property declaration member of a type not marked '@_implementationOnly'}"
3852+
38433853ERROR (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; "
3854+ " cannot use %kind0 %" EXPORTABILITY_REASON_SELECT " 1; "
38513855 " %select{%2 has been imported as implementation-only|"
38523856 " it is an SPI imported from %2|"
38533857 " it is SPI|"
@@ -3859,14 +3863,7 @@ ERROR(decl_from_hidden_module,none,
38593863 " %0 is marked '@_implementationOnly'}3" ,
38603864 (const Decl *, unsigned , Identifier, unsigned ))
38613865ERROR(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 "
3866+ " %0 aliases '%1.%2' and cannot be used %" EXPORTABILITY_REASON_SELECT " 3 "
38703867 " because %select{%4 has been imported as implementation-only|"
38713868 " it is an SPI imported from %4|"
38723869 " <<ERROR>>|"
@@ -3878,12 +3875,7 @@ ERROR(typealias_desugars_to_type_from_hidden_module,none,
38783875 " %0 is marked '@_implementationOnly'}5" ,
38793876 (const TypeAliasDecl *, StringRef, StringRef, unsigned , Identifier, unsigned ))
38803877ERROR(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; "
3878+ " cannot use conformance of %0 to %1 %" EXPORTABILITY_REASON_SELECT " 2; "
38873879 " %select{%3 has been imported as implementation-only|"
38883880 " the conformance is declared as SPI in %3|"
38893881 " the conformance is declared as SPI|"
0 commit comments