Our website uses cookies to enhance your browsing experience.
Accept
to the top

Lucky hour! Grab a free trial license — offer ends in 00:59:58. Claim now

>
>
>
V8014. Two 'if' statements have...
menu mobile close menu
Additional information
toggle menu Contents

V8014. Two 'if' statements have identical conditions. The first 'if' statement contains function return, making the second 'if' redundant, or the code contains a logical error.

Apr 03 2026

The analyzer has detected that the then branch of the if statement is never executed. This happens because the code already contains an if statement with the same condition, which includes an unconditional return in the then branch. This situation may indicate a logical error in the program or that the second if statement is redundant.

Look at the example of the incorrect code:

if l >= 0x06C0 && l <= 0x06CE {
  return true
}
if l == 0x06D5 {                 // <=
  return true
}
if l >= 0x0905 && l <= 0x0939 {
  return true
}
if l == 0x06D5 {                 // <=
  return true
}
if l >= 0x0985 && l <= 0x098C {
  return true
}

In this case, the l == 0x06D5 condition is duplicated, and fixing the code only requires removing one of the checks. However, it is also possible that the second check was meant to be compared to a different value than the first.

The fixed code:

if l >= 0x06C0 && l <= 0x06CE {
  return true
}
if l == 0x06D5 {
  return true
}
if l >= 0x0905 && l <= 0x0939 {
  return true
}
if l >= 0x0985 && l <= 0x098C {
  return true
}

This diagnostic is classified as:

You can look at examples of errors detected by the V8014 diagnostic.