mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix a bunch of minor issues with read accessors.
This commit is contained in:
@@ -300,7 +300,8 @@ static AccessorDecl *createSetterPrototype(TypeChecker &TC,
|
||||
|
||||
// Always add the setter to the context immediately after the getter.
|
||||
if (!getter) getter = storage->getGetter();
|
||||
assert(getter && "always synthesize setter prototype after getter");
|
||||
if (!getter) getter = storage->getReadCoroutine();
|
||||
assert(getter && "always synthesize setter prototype after get/read");
|
||||
addMemberToContextIfNeeded(setter, storage->getDeclContext(), getter);
|
||||
|
||||
return setter;
|
||||
|
||||
Reference in New Issue
Block a user