[swift-users] discardable function start?
J.E. Schotsman
jeschot at xs4all.nl
Mon May 8 06:39:24 CDT 2017
Hello,
I’ve got a compiler warning from hell (actually this is XCGLogger code):
@discardableResult open func add(item: String) -> Bool {
return itemsToMatch.insert(item).inserted
}
open func add<S: Sequence>(items: S) where S.Iterator.Element == String {
for item in items { add(item: item) }
}
Compiler: "@discardableResult declared on a function returning Void is unnecessary"
Fixit: deletes "open func add<S: Se” !
So I cannot get rid of this warning.
Is this a known one?
Jan E.
More information about the swift-users
mailing list