Break recursion when deserializing constrained protocol extensions.

When reading the generic parameters of a constrained protocol
extension, cross-refencing an associated type would perform name
lookup into the protocol extension itself, causing fatal recursion
during deserialization. Fixed by avoiding additional deserialization
when looking for an associated type. Fixes rdar://problem/20812303.

Swift SVN r28228
This commit is contained in:
Doug Gregor
2015-05-06 23:56:58 +00:00
parent 36c605f7dc
commit f2e66d1cd7
7 changed files with 39 additions and 16 deletions

View File

@@ -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 = 199; // Last change: ForeignError.IsReplaced
const uint16_t VERSION_MINOR = 200; // Last change: associated type xref
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -1150,7 +1150,8 @@ namespace decls_block {
using XRefTypePathPieceLayout = BCRecordLayout<
XREF_TYPE_PATH_PIECE,
IdentifierIDField // name
IdentifierIDField, // name
BCFixed<1> // only in nominal
>;
using XRefValuePathPieceLayout = BCRecordLayout<