[swift-evolution] Missing warnings for unused literals (and results)?
jordan_rose at apple.com
Tue Feb 2 21:24:55 CST 2016
> On Feb 2, 2016, at 18:42 , Nate Cook <natecook at gmail.com> wrote:
>> On Feb 1, 2016, at 3:14 PM, Jordan Rose via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> Yep. I'd just consider this a bug, though someone from the standard library would have to confirm that they don't consider it an API change. Feel free to tack it on to SR-245; we might as well do them all at the same time.
>>> On Feb 1, 2016, at 9:44, Félix Cloutier via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>> I think that there should be a warning for unused literals. I can't think of any case where you would like to have a literal just hanging there in Swift.
> I.... do this all the time in Playgrounds, mainly to see if a conditional branch has been executed as I'm testing or building:
> But a warning is a good idea otherwise, and I can figure something else out. :)
Playgrounds automatically suppress unused result warnings, exactly because of this. (Admittedly that can be probematic in the other direction, but still.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution