Unreachable code compiling without error – How?
I believe these are the relevant quotes from JLS 14.21: An empty block that is not a switch block can complete normally iff it is reachable. A non-empty block that is not a switch block can complete normally iff the last statement in it can complete normally. The first statement in a non-empty block that … Read more