mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
For the most part, code should be working with the as-declared abstraction pattern of the storage, because that's the pattern produced by its accessors. However, in the special case of an accessor synthesized on demand to satisfy a protocol conformance, that accessor will use the native abstraction pattern of the declaration, and so the witness thunk that uses that accessor must use that pattern when generating its access. This doesn't matter today because the only on-demand synthesized accessor is materializeForSet, and witnesses for materializeForSet don't actually call the synthetic materializeForSet --- in fact, nothing does. But the modify accessor uses the otherwise-standard pattern where the witness modify calls the concrete modify, and that modify currently uses the native abstraction pattern.
41 KiB
41 KiB