mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Drop typealiases whose underlying types have changed. (#8896)
In order to accomplish this, cross-module references to typealiases are now banned except from within conformances and NameAliasTypes, the latter of which records the canonical type to determine if the typealias has changed. For conformances, we don't have a good way to check if the typealias has changed without trying to map it into context, but that's all right---the rest of the compiler can already fall back to the canonical type.
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 = 335; // Last change: no type in objc method table
|
||||
const uint16_t VERSION_MINOR = 336; // Last change: typealias canonical type
|
||||
|
||||
using DeclID = PointerEmbeddedInt<unsigned, 31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
@@ -571,7 +571,8 @@ namespace decls_block {
|
||||
|
||||
using NameAliasTypeLayout = BCRecordLayout<
|
||||
NAME_ALIAS_TYPE,
|
||||
DeclIDField // typealias decl
|
||||
DeclIDField, // typealias decl
|
||||
TypeIDField // canonical type (a fallback)
|
||||
>;
|
||||
|
||||
using GenericTypeParamTypeLayout = BCRecordLayout<
|
||||
|
||||
Reference in New Issue
Block a user