[swift-users] SCNetworkReachabilityFlags beta 4 issue

Jordan Rose jordan_rose at apple.com
Mon Aug 8 16:15:40 CDT 2016


In master I’m seeing it at least be consistent, warning about both members and not just ‘isLocalAddress’. Since it seems to be a compiler issue I think just filing it at bugs.swift.org is fine, though I’ll warn you that since there’s an easy workaround it might not get prioritized.

Jordan


> On Aug 5, 2016, at 15:09, Jon Shier via swift-users <swift-users at swift.org> wrote:
> 
> Swifters:
> 	I’m attempting to port a library to Xcode 8 beta 4 and have run into a peculiar issue with SCNetworkReachabilityFlags. Prior to beta 4, this extension on SCNetworkReachabilityFlags which provided convenience Bool properties worked just fine:
> 
> extension SCNetworkReachabilityFlags {
>     var isLocalAddress: Bool {
>         return contains(.isLocalAddress)
>     }
> 
>     var isDirect: Bool {
>         return contains(.isDirect)
>     }
> }
> 
> Now, it throws an error:
> 
> instance member 'isLocalAddress' cannot be used on type ‘SCNetworkReachabilityFlags’
> 
> Now, this is rather peculiar, since other OptionSets I create with options and properties of the same name work fine. There must be something peculiar about SCNetworkReachabilityFlags. If I change the properties to no longer match the option values, it builds fine. Is this a bug? If it is, I’m assuming it’s better to report it to Apple rather than swift.org <http://swift.org/>, or should I do both?
> 
> 
> 
> Jon Shier
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160808/7a292a2e/attachment.html>


More information about the swift-users mailing list