mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Delay the validaton of storage accessors until finalization.
The base mutability of storage is part of the signature, so be sure to compute that during validation. Also, serialize it as part of the storage declaration, and fix some places that synthesize declarations to set it correctly.
This commit is contained in:
@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
const uint16_t VERSION_MINOR = 362; // Last change: associated type inherited clause
|
||||
const uint16_t VERSION_MINOR = 363; // Last change: storage get/set mutating
|
||||
|
||||
using DeclID = PointerEmbeddedInt<unsigned, 31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
@@ -910,6 +910,8 @@ namespace decls_block {
|
||||
BCFixed<1>, // static?
|
||||
VarDeclSpecifierField, // specifier
|
||||
BCFixed<1>, // HasNonPatternBindingInit?
|
||||
BCFixed<1>, // is getter mutating?
|
||||
BCFixed<1>, // is setter mutating?
|
||||
StorageKindField, // StorageKind
|
||||
TypeIDField, // interface type
|
||||
DeclIDField, // getter
|
||||
@@ -1018,6 +1020,8 @@ namespace decls_block {
|
||||
DeclContextIDField, // context decl
|
||||
BCFixed<1>, // implicit?
|
||||
BCFixed<1>, // objc?
|
||||
BCFixed<1>, // is getter mutating?
|
||||
BCFixed<1>, // is setter mutating?
|
||||
StorageKindField, // StorageKind
|
||||
GenericEnvironmentIDField, // generic environment
|
||||
TypeIDField, // interface type
|
||||
|
||||
Reference in New Issue
Block a user