mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Handle @transparent on constructors and extensions as well.
Thanks for catching this, Dmitri and Joe. Swift SVN r9354
This commit is contained in:
@@ -944,15 +944,15 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext,
|
||||
|
||||
case decls_block::CONSTRUCTOR_DECL: {
|
||||
DeclID parentID;
|
||||
bool isImplicit, hasSelectorStyleSignature, isObjC;
|
||||
bool isImplicit, hasSelectorStyleSignature, isObjC, isTransparent;
|
||||
TypeID signatureID;
|
||||
TypeID interfaceID;
|
||||
DeclID implicitSelfID;
|
||||
|
||||
decls_block::ConstructorLayout::readRecord(scratch, parentID, isImplicit,
|
||||
hasSelectorStyleSignature,
|
||||
isObjC, signatureID,
|
||||
interfaceID,
|
||||
isObjC, isTransparent,
|
||||
signatureID, interfaceID,
|
||||
implicitSelfID);
|
||||
auto parent = getDeclContext(parentID);
|
||||
if (declOrOffset.isComplete())
|
||||
@@ -1026,6 +1026,8 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext,
|
||||
if (hasSelectorStyleSignature)
|
||||
ctor->setHasSelectorStyleSignature();
|
||||
ctor->setIsObjC(isObjC);
|
||||
if (isTransparent)
|
||||
ctor->getMutableAttrs().setAttr(AK_transparent, SourceLoc());
|
||||
|
||||
if (genericParams)
|
||||
for (auto &genericParam : *ctor->getGenericParams())
|
||||
|
||||
Reference in New Issue
Block a user