discardable function start?


(J.E. Schotsman) #1

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.