[swift-evolution] adding automated-testing of uncompilable features in XCTest
wh1pch81n at gmail.com
Thu Dec 15 00:23:46 CST 2016
Can be used for let
Can be used for var
On Thu, Dec 15, 2016 at 1:16 AM Benjamin Spratling via swift-evolution <
swift-evolution at swift.org> wrote:
> Thanks, I’ll consider this as an alternative.
> I don’t see that this solves the issues of whether a property on a
> class is let, however.
> > On Dec 14, 2016, at 11:41 PM, Derrick Ho <wh1pch81n at gmail.com> wrote:
> > You might be able to ensure access modifiers by using protocols.
> > If you want to ensure that a class has a property called foo that is
> private you can make a private protocol that specifies a private property
> called foo.
> > This isn't a XCTest but it is a compile time check. If a programmer
> tries to change a private property to public then the the compiler will
> > The same can be done with final. Make a protocol with a static method.
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution