Swift compiler is too eager to elide property overrides

I have recently hit a bug when the compiler (Apple 5.1.3) elided override of NSSecureCoding's supportsSecureCoding static property from a subclass which resulted in a crash only when compiled with optimizations. The issue is also mentioned on stackoverflow.
There is a workaround, but I wonder if it's intended behavior and whether there is a better approach.

Related bug on Swift's bugtracker: SR-13157.

Terms of Service

Privacy Policy

Cookie Policy