Skip to content

Commit 10680e4

Browse files
committed
[Type checker] Trigger the creation of the backing storage property.
Recent improvements in the laziness of the type checker mean that we weren't guaranteed to get the backing storage property always synthesized for a wrapped (static) property. Make sure that we create the backing storage property when walking a source file.
1 parent 9f0bc69 commit 10680e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,6 +2413,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
24132413
(void) VD->isGetterMutating();
24142414
(void) VD->isSetterMutating();
24152415

2416+
// Retrieve the backing property of a wrapped property.
2417+
(void) VD->getPropertyWrapperBackingProperty();
2418+
24162419
// Set up accessors, also lowering lazy and @NSManaged properties.
24172420
maybeAddAccessorsToStorage(VD);
24182421

0 commit comments

Comments
 (0)