The analyzer has detected a potential error: the same condition is being checked twice.
Examples:
// Example N1
if A == B {
if A == B {
....
}
}
// Example N2
if A == B {
....
} else {
if A == B {
....
}
}
In the first case, the second A == B check is always true. In the second case, it is always false. Such code may result from refactoring or from using the wrong variable by mistake.
The fixed examples:
// Example N1
if A == B {
if A == C {
....
}
}
// Example N2
if A == B {
....
} else {
if A == C {
....
}
}
This diagnostic rule is classified as:
You can look at examples of errors detected by the V8020 diagnostic. |
Was this page helpful?