Open
Description
Previous ID | SR-7616 |
Radar | None |
Original Reporter | @AnthonyLatsis |
Type | Improvement |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Improvement, DiagnosticsQoI, SILDiagnostics |
Assignee | @devincoughlin |
Priority | Medium |
md5: a72fd643f6cd244d0b74c73ad93da4eb
Issue Description:
There are relatively simple cases when we can show this warning, e.g.
func test(pred: Bool) {
if false && pred {} // Doesn't warn
}
let i = 0
if i > 10 {} // Doesn't warn
let bool1 = true
if !bool1 {} // Warns
let bool2 = true || false
if !bool2 {} // Doesn't warn