An unreachable statement often indicates missing code or a latent bug and should be examined carefully.
Examine the surrounding code to determine why the statement has become unreachable. If it is no longer needed, remove the statement.
In the following example, the body of the
for statement cannot terminate normally,
so the update statement
i++ becomes unreachable:
Most likely, the
return statement should be moved inside the