mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Extend 'availability' attribute with an unconditional 'deprecated' option.
Allow an unversioned 'deprecated' attribute to specify unconditional
deprecation of an API, e.g.,
@availability(*, deprecated, message="sorry")
func foo() { }
Also support platform-specific deprecation, e.g.,
@availability(iOS, deprecated, message="don't use this on iOS")
func bar() { }
Addresses rdar://problem/20562871.
Swift SVN r27355
This commit is contained in:
@@ -51,7 +51,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// To ensure that two separate changes don't silently get merged into one
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made.
|
||||
const uint16_t VERSION_MINOR = 192; // Last change: include the type decl for type witnesses
|
||||
const uint16_t VERSION_MINOR = 193; // Last change: deprecated attribute
|
||||
|
||||
using DeclID = Fixnum<31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
@@ -1263,6 +1263,7 @@ namespace decls_block {
|
||||
Availability_DECL_ATTR,
|
||||
BCFixed<1>, // implicit flag
|
||||
BCFixed<1>, // is unconditionally unavailable?
|
||||
BCFixed<1>, // is unconditionally deprecated?
|
||||
BC_AVAIL_TUPLE, // Introduced
|
||||
BC_AVAIL_TUPLE, // Deprecated
|
||||
BC_AVAIL_TUPLE, // Obsoleted
|
||||
|
||||
Reference in New Issue
Block a user