www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Unreachable warning is annoying

https://forum.dlang.org/post/zpqpwsmzledcvvpynnfo forum.dlang.org

It is a compile-time error if a statement cannot be executed 
because it is unreachable. This means that the control flow of 
your program can't get to that statement, but you assume that 
they would be. The compiler analyzes the flow, and reports these 
statements to you as error messages. It is a reliable indicators 
of logical error in your program.

When the compiler reports an unreachable statement , it typically 
points you to the statement. When that happens, you can follow 
the flow of control from top to bottom to discover why the 
statement can never be reached. There are quite strict rules when 
statements are reachable in java. These rules are design to be 
easily evaluated and not to be 100% accurate. It should prevent 
basic programming errors.

http://net-informations.com/java/err/unreachable.htm
Nov 25 2019