mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SE-0258] Make sure we add accessors to backing storage in classes.
Thanks to Avi on the Swift Forums for pointing this out!
This commit is contained in:
@@ -1973,7 +1973,9 @@ void swift::maybeAddAccessorsToStorage(AbstractStorageDecl *storage) {
|
||||
return;
|
||||
|
||||
// Implicit properties don't get accessors.
|
||||
if (storage->isImplicit())
|
||||
if (storage->isImplicit() &&
|
||||
!(isa<VarDecl>(storage) &&
|
||||
cast<VarDecl>(storage)->getOriginalDelegatedProperty()))
|
||||
return;
|
||||
|
||||
if (!dc->isTypeContext()) {
|
||||
|
||||
Reference in New Issue
Block a user