Howdy,
        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.
-Ben

> On Dec 14, 2016, at 11:41 PM, Derrick Ho <[email protected]> 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 complain.
> 
> The same can be done with final. Make a protocol with a static method.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to