Due to a serendipitous confluence of interesting behaviors,
Swift 3 allowed you to define a lazy property with an IUO
type, and setting the property to nil would 'reset' it,
re-evaluating the lazy getter the next time the property
was accessed.
This was not intended behavior and it no longer works,
so add a test that it no longer works.
Fixes <rdar://problem/32687168> and
<https://bugs.swift.org/browse/SR-5172>.
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