The following patch introduced a regression where materializeForSet
did not invoke didSet/willSet for stored properties with observers:
<249242b08d>
The old SILGen materializeForSet was only used for witness thunks,
where it used Ordinary access semantics for the storage.
When I switched over to using the new materializeForSet implementation
for static thunks too, I added some logic to use DirectToStorage access
semantics where appropriate, however this was wrong for observable
properties, which need DirectToAccessor semantics.
Fixes <rdar://problem/24315392>.
The functional difference is:
ClassDecl *DeclContext::isClassOrClassExtensionContext() const {
- if (auto ctx = getDeclaredTypeOfContext())
+ if (auto ctx = getDeclaredTypeInContext())
As expected, I didn't get the sense of Of/In right, manifesting in a nasty bug.
Swift SVN r18216