Unreachable warning is annoying

creigelde creigelde at protonmail.com
Tue Nov 26 05:26:46 UTC 2019


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.


More information about the Digitalmars-d mailing list