mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: The primary associated type list references existing associated types instead of declaring new ones
This commit is contained in:
@@ -2777,13 +2777,11 @@ public:
|
||||
TypeID defaultDefinitionID;
|
||||
bool isImplicit;
|
||||
ArrayRef<uint64_t> rawOverriddenIDs;
|
||||
bool isPrimary;
|
||||
|
||||
decls_block::AssociatedTypeDeclLayout::readRecord(scratch, nameID,
|
||||
contextID,
|
||||
defaultDefinitionID,
|
||||
isImplicit,
|
||||
isPrimary,
|
||||
rawOverriddenIDs);
|
||||
|
||||
auto DC = MF.getDeclContext(contextID);
|
||||
@@ -2818,9 +2816,6 @@ public:
|
||||
}
|
||||
assocType->setOverriddenDecls(overriddenAssocTypes);
|
||||
|
||||
if (isPrimary)
|
||||
assocType->setPrimary();
|
||||
|
||||
return assocType;
|
||||
}
|
||||
|
||||
@@ -3666,8 +3661,10 @@ public:
|
||||
if (declOrOffset.isComplete())
|
||||
return declOrOffset;
|
||||
|
||||
auto proto = MF.createDecl<ProtocolDecl>(DC, SourceLoc(), SourceLoc(), name,
|
||||
None, /*TrailingWhere=*/nullptr);
|
||||
auto proto = MF.createDecl<ProtocolDecl>(
|
||||
DC, SourceLoc(), SourceLoc(), name,
|
||||
ArrayRef<PrimaryAssociatedTypeName>(), None,
|
||||
/*TrailingWhere=*/nullptr);
|
||||
declOrOffset = proto;
|
||||
|
||||
ctx.evaluator.cacheOutput(ProtocolRequiresClassRequest{proto},
|
||||
|
||||
Reference in New Issue
Block a user