> On Jul 1, 2016, at 5:25 PM, Charles Srstka <[email protected]> wrote:
> 
>> On Jul 1, 2016, at 4:12 PM, Douglas Gregor via swift-evolution 
>> <[email protected] <mailto:[email protected]>> wrote:
>> 
>> FYI, in-progress implementation is available at:
>> 
>>      https://github.com/apple/swift/tree/nserror-bridging 
>> <https://github.com/apple/swift/tree/nserror-bridging>
>> 
>> The only issue I’ve found so far with the proposal is this bit:
>> 
>>      When we introduce this bridging, we will need to remove NSError's 
>> conformance to ErrorProtocol to avoid creating cyclic implicit conversions. 
>> However, one can still explicitly turn an NSError into ErrorProtocol via a 
>> bridging cast, e.g., nsError as ErrorProtocol.
>> 
>> This doesn’t work, because the model really needs NSError to conform to 
>> ErrorProtocol. Instead, we should break the implicit conversion by not 
>> allowing an implicit conversion from an arbitrary ErrorProtocol to NSError, 
>> which is in line with what SE-0072 would do anyway.
> 
> What exactly in the model causes it to require NSError to conform to 
> ErrorProtocol?

ErrorProtocol uses a single-pointer, boxed representation where an NSError 
pointer can be used directly. Basically, ErrorProtocol is represented as an 
NSError, always.

        - Doug


_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to