@@ -931,6 +931,12 @@ WARNING(parameter_unnamed_warn,none,
931931ERROR(parameter_curry_syntax_removed,none,
932932 " cannot have more than one parameter list" , ())
933933
934+ ERROR(availability_cannot_be_mixed,none,
935+ " #available and #unavailable cannot be in the same statement" , ())
936+
937+ ERROR(false_available_is_called_unavailable,none,
938+ " #available cannot be used as an expression, did you mean to use '#unavailable'?" , ())
939+
934940ERROR(initializer_as_typed_pattern,none,
935941 " unexpected initializer in pattern; did you mean to use '='?" , ())
936942
@@ -1223,8 +1229,8 @@ ERROR(invalid_float_literal_missing_leading_zero,none,
12231229 " '.%0' is not a valid floating point literal; it must be written '0.%0'" ,
12241230 (StringRef))
12251231ERROR(availability_query_outside_if_stmt_guard, none,
1226- " #available may only be used as condition of an 'if', 'guard'"
1227- " or 'while' statement" , ())
1232+ " %0 may only be used as condition of an 'if', 'guard'"
1233+ " or 'while' statement" , (StringRef ))
12281234
12291235ERROR(empty_arg_label_underscore, none,
12301236 " an empty argument label is spelled with '_'" , ())
@@ -1812,14 +1818,17 @@ ERROR(avail_query_version_comparison_not_needed,
18121818ERROR(availability_query_wildcard_required, none,
18131819 " must handle potential future platforms with '*'" , ())
18141820
1821+ ERROR(unavailability_query_wildcard_not_required, none,
1822+ " platform wildcard '*' is always implicit in #unavailable" , ())
1823+
18151824ERROR(availability_must_occur_alone, none,
18161825 " '%0' version-availability must be specified alone" , (StringRef))
18171826
18181827ERROR(pound_available_swift_not_allowed, none,
1819- " Swift language version checks not allowed in #available (...)" , ())
1828+ " Swift language version checks not allowed in %0 (...)" , (StringRef ))
18201829
18211830ERROR(pound_available_package_description_not_allowed, none,
1822- " PackageDescription version checks not allowed in #available (...)" , ())
1831+ " PackageDescription version checks not allowed in %0 (...)" , (StringRef ))
18231832
18241833ERROR(availability_query_repeated_platform, none,
18251834 " version for '%0' already specified" , (StringRef))
0 commit comments