mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
fix rdar://17405715 - lazy property crashes silgen of implicit memberwise initializer
The issue here is that SILGen is expecting the argument pattern for the synthesized ConstructorDecl to line up with the stored property list for the decl containing the constructor. This is super fragile and probably the wrong way to go (it would be better for sema to synthesize the entire ctor and make it not be magical at all in silgen), but do a small fix to improve the situation by inserting the lazy property storage next to the computed lazy property. Swift SVN r19642
This commit is contained in:
@@ -369,8 +369,9 @@ public:
|
||||
/// Retrieve the set of members in this context.
|
||||
DeclRange getMembers() const;
|
||||
|
||||
/// Add a member to this context.
|
||||
void addMember(Decl *member);
|
||||
/// Add a member to this context. If the hint decl is specified, the new decl
|
||||
/// is inserted next to the hint.
|
||||
void addMember(Decl *member, Decl *hint = nullptr);
|
||||
|
||||
/// Retrieve the lazy member loader.
|
||||
LazyMemberLoader *getLoader() const {
|
||||
@@ -401,7 +402,7 @@ private:
|
||||
///
|
||||
/// This is used internally when loading members, because loading a
|
||||
/// member is an invisible addition.
|
||||
void addMemberSilently(Decl *member) const;
|
||||
void addMemberSilently(Decl *member, Decl *hint = nullptr) const;
|
||||
};
|
||||
|
||||
} // end namespace swift
|
||||
|
||||
Reference in New Issue
Block a user