[swift-evolution] #available has a huge anti-pattern.

Joe Groff jgroff at apple.com
Wed Feb 3 15:37:25 CST 2016


> On Feb 3, 2016, at 1:20 PM, Zach Waldowski via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Joe —
>  
> Is this intended to be a supported behavior? I was all excited the other day to discover this behavior, using it to backport iOS 9's NSLayoutConstraint DSL. It mostly works, but as soon as an expression gets relatively complex (array literals >5 or so) or has any sort of error in it, Swift falls back to reporting an availability error.

That sounds like a diagnostic bug. Got an example you can file in a bug report?

-Joe


More information about the swift-evolution mailing list