I wanted to use the
@warn_unused_result @rethrows func filter(@noescape includeElement: (Self.Generator.Element) throws -> Bool) rethrows -> [Self.Generator.Element] method in one of my projects. The App should run on iOS 8 and later. If I look the method up in the documentation it says "Availability: iOS (9.2 and later)"
However, if I call the method on iOS 8.4 it works w/o any issues.
Any ideas why the documentation says iOS 9.2 but it still works on iOS 8.4? So can I call it w/o any availability check and be sure it won't crash in the future?
Thanks in advance!
This is the part of Swift standard library, it doesn't depend on iOS SDK at all. Swift runtime is bundled with application, so for the system it doesn't matter which version of Swift application was written in. I assume that this availibility mark might have something in common with the change which was made to
filter function in Swift 2. Look at those two docs:
As you can see, declarations of those two methods are different.