[swift-dev] "Near-miss" warnings for protocol conformances

Douglas Gregor dgregor at apple.com
Thu Nov 2 10:42:41 CDT 2017



> On Nov 2, 2017, at 7:47 AM, Ted Kremenek <kremenek at apple.com> wrote:
> 
> 
> 
>> On Oct 31, 2017, at 11:09 PM, Douglas Gregor <dgregor at apple.com> wrote:
>> 
>> 
>> 
>>> On Oct 31, 2017, at 11:08 PM, Ted Kremenek <kremenek at apple.com> wrote:
>>> 
>>> 
>>> 
>>>> On Oct 26, 2017, at 9:28 PM, Douglas Gregor via swift-dev <swift-dev at swift.org> wrote:
>>>> 
>>>> Unlabeled single-value initializers are probably going to cause a number of false positives, because we can’t figure out which one we meant.
>>> 
>>> Hi Doug,
>>> 
>>> This all looks very promising. Do you have any thoughts about how one would go about suppressing false positives?
>> 
>> 
>> Yes, you can move the declaration it’s warning about to a different extension to suppress the false positive.
> 
> Cool.  Will that be reflected in a ‘note’?

… it’s up there in my original post:

/Users/dgregor/Projects/swift/swift/stdlib/public/core/ValidUTF8Buffer.swift:205:24: note: move 'append(contentsOf:)' to another extension to silence this warning
 public mutating func append<T>(contentsOf other: _ValidUTF8Buffer<T>) {
                      ^

	- Doug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20171102/01755dc4/attachment.html>


More information about the swift-dev mailing list