Toll-free bridging of CFError to NSError not working in Swift 3
<p>Converting our codebase to Swift 3, I have this problem:</p>

<pre><code>ABAddressBookRequestAccessWithCompletion(addressBookRef) { (granted: Bool, error: CFError?) in
        DispatchQueue.main.async {

            if let nsError = error as NSError {
                ...   
            }
        }
}
</code></pre>

<p>Compiler error is: 
<code>Cannot convert value of type 'CFError?' to type 'NSError' in coercion</code></p>

<hr>

<p>Changing to:</p>

<pre><code>if let nsError = error as? NSError { ... }
</code></pre>

<p>Gives the warning: <code>Cast from 'CFError?' to unrelated type 'NSError' always fails</code></p>