mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Opaque result types] Fix mangling issues with opaque result types.
Fix a trio of issues involving mangling for opaque result types: * Symbolic references to opaque type descriptors are not substitutions * Mangle protocol extension contexts correctly * Mangle generic arguments for opaque result types of generic functions The (de-)serialization of generic parameter lists for opaque type declarations is important for the last bullet, to ensure that the mangling of generic arguments of opaque result types works across module boundaries. Fixes the rest of rdar://problem/50038754.
This commit is contained in:
@@ -52,7 +52,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
|
||||
/// 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.
|
||||
/// Don't worry about adhering to the 80-column limit for this line.
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 486; // Last change: Opaque result types
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 487; // Last change: Opaque result types generic params
|
||||
|
||||
using DeclIDField = BCFixed<31>;
|
||||
|
||||
@@ -1101,6 +1101,7 @@ namespace decls_block {
|
||||
TypeIDField, // interface type for opaque type
|
||||
GenericEnvironmentIDField, // generic environment
|
||||
SubstitutionMapIDField // optional substitution map for underlying type
|
||||
// trailed by generic parameters
|
||||
>;
|
||||
|
||||
// TODO: remove the unnecessary FuncDecl components here
|
||||
|
||||
Reference in New Issue
Block a user