mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When overriding storage with a forced static dispatch materializeForSet, the override's materializeForSet should not override the base materializeForSet. This is the case where a dynamic property witnesses a protocol requirement, and Sema synthesizes a materializeForSet for it. In this case, the synthesized materializeForSet dynamically dispatches to the dynamic property's getter and setter, and the protocol witness thunk directly calls the synthesized materializeForSet. The subclass only needs to override the getter and setter in this case, since the base class's materializeForSet will already do the right thing. In fact, marking it as an override exposes a problem where we cannot serialize an xref to an imported property's materializeForSet, since it was not created by the importer.
89 KiB
89 KiB