@@ -105,11 +105,11 @@ ERROR(could_not_use_member_on_existential,none,
105
105
(Type, DeclName))
106
106
107
107
ERROR(candidate_inaccessible,none,
108
- " %0 is inaccessible due to '%select{private|internal|PUBLIC}1' "
108
+ " %0 is inaccessible due to '%select{private|fileprivate| internal|PUBLIC}1' "
109
109
" protection level" , (DeclName, Accessibility))
110
110
111
111
ERROR(init_candidate_inaccessible,none,
112
- " %0 initializer is inaccessible due to '%select{private|internal|PUBLIC}1' "
112
+ " %0 initializer is inaccessible due to '%select{private|fileprivate| internal|PUBLIC}1' "
113
113
" protection level" , (Type, Accessibility))
114
114
115
115
@@ -924,34 +924,34 @@ ERROR(attr_methods_only,none,
924
924
ERROR(access_control_in_protocol,none,
925
925
" %0 modifier cannot be used in protocols" , (DeclAttribute))
926
926
ERROR(access_control_setter,none,
927
- " '%select{private|internal|public}0(set)' modifier can only be applied "
927
+ " '%select{private|fileprivate| internal|public}0(set)' modifier can only be applied "
928
928
" to variables and subscripts" ,
929
929
(Accessibility))
930
930
ERROR(access_control_setter_read_only,none,
931
- " '%select{private|internal|public}0(set)' modifier cannot be applied to "
931
+ " '%select{private|fileprivate| internal|public}0(set)' modifier cannot be applied to "
932
932
" %select{constants|read-only variables|read-only properties"
933
933
" |read-only subscripts}1" ,
934
934
(Accessibility, unsigned ))
935
935
ERROR(access_control_setter_more,none,
936
- " %select{private|internal|PUBLIC}0 "
936
+ " %select{private|fileprivate| internal|PUBLIC}0 "
937
937
" %select{variable|property|subscript}1 cannot have "
938
- " %select{PRIVATE|an internal|a public}2 setter" ,
938
+ " %select{PRIVATE|a fileprivate| an internal|a public}2 setter" ,
939
939
(Accessibility, unsigned , Accessibility))
940
940
WARNING(access_control_member_more,none,
941
- " declaring %select{PRIVATE|an internal|a public}0 %1 for "
942
- " %select{a private|an internal|PUBLIC}2 %3" ,
941
+ " declaring %select{PRIVATE|a fileprivate| an internal|a public}0 %1 for "
942
+ " %select{a private|a fileprivate| an internal|PUBLIC}2 %3" ,
943
943
(Accessibility, DescriptiveDeclKind, Accessibility, DescriptiveDeclKind))
944
944
WARNING(access_control_ext_member_more,none,
945
- " declaring %select{PRIVATE|an internal|a public}0 %1 in "
946
- " %select{a private|an internal|PUBLIC}2 extension" ,
945
+ " declaring %select{PRIVATE|a fileprivate| an internal|a public}0 %1 in "
946
+ " %select{a private|a fileprivate| an internal|PUBLIC}2 extension" ,
947
947
(Accessibility, DescriptiveDeclKind, Accessibility))
948
948
ERROR(access_control_ext_requirement_member_more,none,
949
- " cannot declare %select{PRIVATE|an internal|a public}0 %1 in "
950
- " an extension with %select{private|internal|PUBLIC}2 requirements" ,
949
+ " cannot declare %select{PRIVATE|a fileprivate| an internal|a public}0 %1 in "
950
+ " an extension with %select{private|fileprivate| internal|PUBLIC}2 requirements" ,
951
951
(Accessibility, DescriptiveDeclKind, Accessibility))
952
952
ERROR(access_control_extension_more,none,
953
- " extension of %select{private|internal|PUBLIC}0 %1 cannot be "
954
- " declared %select{PRIVATE|internal|public}2" ,
953
+ " extension of %select{private|fileprivate| internal|PUBLIC}0 %1 cannot be "
954
+ " declared %select{PRIVATE|fileprivate| internal|public}2" ,
955
955
(Accessibility, DescriptiveDeclKind, Accessibility))
956
956
957
957
ERROR(invalid_decl_attribute_simple,none,
@@ -1039,15 +1039,15 @@ ERROR(static_requires_initializer,none,
1039
1039
" expression or getter/setter specifier" , (StaticSpellingKind))
1040
1040
ERROR(pattern_type_access,none,
1041
1041
" %select{%select{variable|constant}0|property}1 "
1042
- " %select{must be declared %select{private|internal|PUBLIC}4"
1043
- " |cannot be declared %select{PRIVATE|internal|public}3}2 because its "
1044
- " type uses %select{a private|an internal|PUBLIC}4 type" ,
1042
+ " %select{must be declared %select{private|fileprivate| internal|PUBLIC}4"
1043
+ " |cannot be declared %select{PRIVATE|fileprivate| internal|public}3}2 because its "
1044
+ " type uses %select{a private|a fileprivate| an internal|PUBLIC}4 type" ,
1045
1045
(bool , bool , bool , Accessibility, Accessibility))
1046
1046
ERROR(pattern_type_access_inferred,none,
1047
1047
" %select{%select{variable|constant}0|property}1 "
1048
- " %select{must be declared %select{private|internal|PUBLIC}4"
1049
- " |cannot be declared %select{PRIVATE|internal|public}3}2 because its "
1050
- " type %5 uses %select{a private|an internal|PUBLIC}4 type" ,
1048
+ " %select{must be declared %select{private|fileprivate| internal|PUBLIC}4"
1049
+ " |cannot be declared %select{PRIVATE|fileprivate| internal|public}3}2 because its "
1050
+ " type %5 uses %select{a private|a fileprivate| an internal|PUBLIC}4 type" ,
1051
1051
(bool , bool , bool , Accessibility, Accessibility, Type))
1052
1052
ERROR(pattern_binds_no_variables,none,
1053
1053
" %select{property|global variable}0 declaration does not bind any "
@@ -1070,26 +1070,26 @@ ERROR(unsupported_type_nested_in_generic_function,none,
1070
1070
ERROR(circular_type_alias,none,
1071
1071
" type alias %0 circularly references itself" , (Identifier))
1072
1072
ERROR(type_alias_underlying_type_access,none,
1073
- " type alias %select{must be declared %select{private|internal|PUBLIC}2"
1074
- " |cannot be declared %select{PRIVATE|internal|public}1}0 because its "
1075
- " underlying type uses %select{a private|an internal|PUBLIC}2 type" ,
1073
+ " type alias %select{must be declared %select{private|fileprivate| internal|PUBLIC}2"
1074
+ " |cannot be declared %select{PRIVATE|fileprivate| internal|public}1}0 because its "
1075
+ " underlying type uses %select{a private|a fileprivate| an internal|PUBLIC}2 type" ,
1076
1076
(bool , Accessibility, Accessibility))
1077
1077
1078
1078
// Subscripts
1079
1079
ERROR(subscript_type_access,none,
1080
- " subscript %select{must be declared %select{private|internal|PUBLIC}2"
1081
- " |cannot be declared %select{PRIVATE|internal|public}1}0 because its "
1080
+ " subscript %select{must be declared %select{private|fileprivate| internal|PUBLIC}2"
1081
+ " |cannot be declared %select{PRIVATE|fileprivate| internal|public}1}0 because its "
1082
1082
" %select{index|element type}3 uses "
1083
- " %select{a private|an internal|PUBLIC}2 type" ,
1083
+ " %select{a private|a fileprivate| an internal|PUBLIC}2 type" ,
1084
1084
(bool , Accessibility, Accessibility, bool ))
1085
1085
1086
1086
// Functions
1087
1087
ERROR(function_type_access,none,
1088
1088
" %select{function|method|initializer}3 "
1089
- " %select{must be declared %select{private|internal|PUBLIC}2"
1090
- " |cannot be declared %select{PRIVATE|internal|public}1}0 because its "
1089
+ " %select{must be declared %select{private|fileprivate| internal|PUBLIC}2"
1090
+ " |cannot be declared %select{PRIVATE|fileprivate| internal|public}1}0 because its "
1091
1091
" %select{parameter|result}4 uses "
1092
- " %select{a private|an internal|PUBLIC}2 type" ,
1092
+ " %select{a private|a fileprivate| an internal|PUBLIC}2 type" ,
1093
1093
(bool , Accessibility, Accessibility, unsigned , bool ))
1094
1094
WARNING(non_trailing_closure_before_default_args,none,
1095
1095
" closure parameter prior to parameters with default arguments will "
@@ -1191,28 +1191,28 @@ ERROR(witness_requires_dynamic_self,none,
1191
1191
ERROR(witness_not_accessible_proto,none,
1192
1192
" %select{initializer %1|method %1|%select{|setter for }2property %1"
1193
1193
" |subscript%select{| setter}2}0 must be declared "
1194
- " %select{PRIVATE|internal|public}3 because it matches a requirement "
1195
- " in %select{PRIVATE|internal|public}3 protocol %4" ,
1194
+ " %select{PRIVATE|fileprivate| internal|public}3 because it matches a requirement "
1195
+ " in %select{PRIVATE|fileprivate| internal|public}3 protocol %4" ,
1196
1196
(RequirementKind, DeclName, bool , Accessibility, DeclName))
1197
1197
ERROR(witness_not_accessible_type,none,
1198
1198
" %select{initializer %1|method %1|%select{|setter for }2property %1"
1199
1199
" |subscript%select{| setter}2}0 must be as accessible as its enclosing "
1200
1200
" type because it matches a requirement in protocol %4" ,
1201
1201
(RequirementKind, DeclName, bool , Accessibility, DeclName))
1202
1202
ERROR(type_witness_not_accessible_proto,none,
1203
- " %0 %1 must be declared %select{PRIVATE|internal|public}2 because it "
1204
- " matches a requirement in %select{PRIVATE|internal|public}2 protocol %3" ,
1203
+ " %0 %1 must be declared %select{PRIVATE|fileprivate| internal|public}2 because it "
1204
+ " matches a requirement in %select{PRIVATE|fileprivate| internal|public}2 protocol %3" ,
1205
1205
(DescriptiveDeclKind, DeclName, Accessibility, DeclName))
1206
1206
ERROR(type_witness_not_accessible_type,none,
1207
1207
" %0 %1 must be as accessible as its enclosing type because it "
1208
1208
" matches a requirement in protocol %3" ,
1209
1209
(DescriptiveDeclKind, DeclName, Accessibility, DeclName))
1210
1210
1211
1211
ERROR(protocol_refine_access,none,
1212
- " %select{protocol must be declared %select{private|internal|PUBLIC}2 "
1212
+ " %select{protocol must be declared %select{private|fileprivate| internal|PUBLIC}2 "
1213
1213
" because it refines"
1214
- " |%select{PRIVATE|internal|public}1 protocol cannot refine}0 "
1215
- " %select{a private|an internal|PUBLIC}2 protocol" ,
1214
+ " |%select{PRIVATE|fileprivate| internal|public}1 protocol cannot refine}0 "
1215
+ " %select{a private|a fileprivate| an internal|PUBLIC}2 protocol" ,
1216
1216
(bool , Accessibility, Accessibility))
1217
1217
ERROR(protocol_property_must_be_computed_var,none,
1218
1218
" immutable property requirement must be declared as 'var' with a "
@@ -1240,8 +1240,8 @@ NOTE(default_associated_type_req_fail,none,
1240
1240
" does not conform to %3" ,
1241
1241
(Type, DeclName, Type, Type))
1242
1242
ERROR(associated_type_access,none,
1243
- " associated type in %select{PRIVATE|an internal|a public}0 protocol "
1244
- " uses %select{a private|an internal|PUBLIC}1 type in its "
1243
+ " associated type in %select{PRIVATE|a fileprivate| an internal|a public}0 protocol "
1244
+ " uses %select{a private|a fileprivate| an internal|PUBLIC}1 type in its "
1245
1245
" %select{default definition|requirement}2 " ,
1246
1246
(Accessibility, Accessibility, unsigned ))
1247
1247
@@ -1345,7 +1345,7 @@ NOTE(optional_req_near_match_move,none,
1345
1345
NOTE(optional_req_near_match_nonobjc,none,
1346
1346
" add '@nonobjc' to silence this %select{warning|error}0" , (bool ))
1347
1347
NOTE(optional_req_near_match_accessibility,none,
1348
- " make %0 %select{ERROR|private|private or internal}1 to silence this "
1348
+ " make %0 %select{ERROR|ERROR|fileprivate|fileprivate or internal}1 to silence this "
1349
1349
" warning" , (DeclName, Accessibility))
1350
1350
1351
1351
// Protocols and existentials
@@ -1397,10 +1397,10 @@ ERROR(requires_generic_param_same_type_does_not_conform,none,
1397
1397
(Type, Identifier))
1398
1398
1399
1399
ERROR(generic_param_access,none,
1400
- " %0 %select{must be declared %select{private|internal|PUBLIC}3"
1401
- " |cannot be declared %select{PRIVATE|internal|public}2}1 because its "
1400
+ " %0 %select{must be declared %select{private|fileprivate| internal|PUBLIC}3"
1401
+ " |cannot be declared %select{PRIVATE|fileprivate| internal|public}2}1 because its "
1402
1402
" generic %select{parameter|requirement}4 uses "
1403
- " %select{a private|an internal|PUBLIC}3 type" ,
1403
+ " %select{a private|a fileprivate| an internal|PUBLIC}3 type" ,
1404
1404
(DescriptiveDeclKind, bool , Accessibility, Accessibility, bool ))
1405
1405
1406
1406
ERROR(override_multiple_decls_base,none,
@@ -1576,8 +1576,8 @@ ERROR(inheritance_from_objc_runtime_visible_class,none,
1576
1576
1577
1577
// Enums
1578
1578
ERROR(enum_case_access,none,
1579
- " enum case in %select{PRIVATE|an internal|a public}0 enum uses "
1580
- " %select{a private|an internal|PUBLIC}1 type" ,
1579
+ " enum case in %select{PRIVATE|a fileprivate| an internal|a public}0 enum uses "
1580
+ " %select{a private|a fileprivate| an internal|PUBLIC}1 type" ,
1581
1581
(Accessibility, Accessibility))
1582
1582
ERROR(enum_stored_property,none,
1583
1583
" enums may not contain stored properties" , ())
@@ -1596,9 +1596,9 @@ ERROR(enum_raw_type_not_equatable,none,
1596
1596
" RawRepresentable 'init' cannot be synthesized because raw type %0 is not "
1597
1597
" Equatable" , (Type))
1598
1598
ERROR(enum_raw_type_access,none,
1599
- " enum %select{must be declared %select{private|internal|PUBLIC}2"
1600
- " |cannot be declared %select{PRIVATE|internal|public}1}0 because its "
1601
- " raw type uses %select{a private|an internal|PUBLIC}2 type" ,
1599
+ " enum %select{must be declared %select{private|fileprivate| internal|PUBLIC}2"
1600
+ " |cannot be declared %select{PRIVATE|fileprivate| internal|public}1}0 because its "
1601
+ " raw type uses %select{a private|a fileprivate| an internal|PUBLIC}2 type" ,
1602
1602
(bool , Accessibility, Accessibility))
1603
1603
1604
1604
NOTE(enum_here,none,
@@ -2490,9 +2490,9 @@ ERROR(self_in_nominal,none,
2490
2490
" 'Self' is only available in a protocol or as the result of a "
2491
2491
" method in a class; did you mean %0?" , (Identifier))
2492
2492
ERROR(class_super_access,none,
2493
- " class %select{must be declared %select{private|internal|PUBLIC}2"
2494
- " |cannot be declared %select{PRIVATE|internal|public}1}0 because its "
2495
- " superclass is %select{private|internal|PUBLIC}2" ,
2493
+ " class %select{must be declared %select{private|fileprivate| internal|PUBLIC}2"
2494
+ " |cannot be declared %select{PRIVATE|fileprivate| internal|public}1}0 because its "
2495
+ " superclass is %select{private|fileprivate| internal|PUBLIC}2" ,
2496
2496
(bool , Accessibility, Accessibility))
2497
2497
ERROR(dot_protocol_on_non_existential,none,
2498
2498
" cannot use 'Protocol' with non-protocol type %0" , (Type))
0 commit comments