<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Drew,<div class=""><br class=""></div><div class="">This difference is a consequence of the lack of bridging between types like String and NSString.</div><div class=""><br class=""></div><div class="">If this API returned [String : AnyObject], then the dictionary could not contain String (because String is not an object).</div><div class=""><br class=""></div><div class="">This is something we will have to fix up in some comprehensive way in both Darwin and CoreLibs Foundation, but there is no answer yet.</div><div class=""><br class=""></div><div class="">In this particular case, how would you use the #if? Any should be source compatible with AnyObject, since Any is a superset of AnyObject, right?</div><div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 1, 2016, at 11:26 PM, Drew Crawford via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi folks,<div class=""><br class=""></div><div class="">I notice that swift-corelibs-foundation is (apparently) deliberately incompatible with Darwin Foundation (<a href="https://github.com/apple/swift-corelibs-foundation/blame/master/Foundation/NSFileManager.swift#L324" class="">https://github.com/apple/swift-corelibs-foundation/blame/master/Foundation/NSFileManager.swift#L324</a>) at least for the immediate future.</div><div class=""><br class=""></div><div class="">I'm wondering if we can get an #if that would let me write conditional code.</div><div class=""><br class=""></div><div class="">Obviously the "real" answer is to fix the bugs, but (at least on my side) that will happen a lot faster if I "can" easily build the same codebase against corelibs-foundation and darwin-foundation.</div><div class=""><br class=""></div><div class=""><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=U7z7oSqRMSwdl2rYt9JJ4zIFaeg4R-2FxExg9xndDuCbw5QON-2Fkh6HrIFwe2vkeb3nMbnvQSle3J2gzjEc41TDoSF6kuzHVSKBhnrtNhx3J-2F7gZVuRl9txL2hEDVIfDF0OntNuFhDI5DXFKoamPfoUYXadCRt4q1haLsCtHrmCmZuUVWoPfUXYP5f6a79xROsdUGckDkzSiHFaXv2izpMoOBUc3CzXqQCbdLWCpzg8S90-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev<br class=""></div></blockquote></div><br class=""></div></body></html>