Add test for try with resources
Fix unreachable break/continue generation