[swift-evolution] clang auto-attaching @discardableResult attribute on imported declarations

Pär Strindevall par at strindevall.com
Fri Oct 21 06:55:42 CDT 2016


I got sick of having to assign unused results with _ = when using Objective-C dependencies so I decided to fork and fix the one I was using before finishing the line. When I searched for solutions to the problem I stumbled upon SE-0047 here: https://bugs.swift.org/browse/SR-1052 <https://bugs.swift.org/browse/SR-1052>

I noted that suggested patch 3 was to change the clang importer to attach @discardableResult automatically to imported declarations like the one I was using. Did this not happen? Is there any way for me to suppress the warnings that flood Xcode when not assigning unused results to nada if the dependency I’m bleep-blooping with is implemented in Objective-C?


Pär Strindevall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161021/2da8f0e4/attachment.html>

More information about the swift-evolution mailing list