mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Check cyclic dependencies for typealiases better.
Deserializing a typealias's underlying type can lead to us trying to deserialize the alias again. When we get back to the outer request, check to see if there was an inner request, in which case we don't need to do anything else. <rdar://problem/14757837> Swift SVN r7280
This commit is contained in:
@@ -736,12 +736,11 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext,
|
||||
superclassTypeID);
|
||||
|
||||
auto DC = ForcedContext ? *ForcedContext : getDeclContext(contextID);
|
||||
|
||||
auto underlyingType = TypeLoc::withoutLoc(getType(underlyingTypeID));
|
||||
|
||||
if (declOrOffset.isComplete())
|
||||
break;
|
||||
|
||||
auto underlyingType = TypeLoc::withoutLoc(getType(underlyingTypeID));
|
||||
|
||||
auto alias = new (ctx) TypeAliasDecl(SourceLoc(), getIdentifier(nameID),
|
||||
SourceLoc(), underlyingType,
|
||||
DC, { });
|
||||
|
||||
Reference in New Issue
Block a user