I *think* it's because - if time is not one of 9,10,11,12,1,2,3,4,5 then nothing is returned????
can you not just add a return statement to the default? Should work then
What he said about the return statement.
You have a function that returns a boolean and it should return a boolean on all code paths.
The unreachable code is likely to do with the break statements.
If you're returning from each of the defined cases then the break statements after each return are never actually reached.
What he said about the return statement.
You have a function that returns a boolean and it should return a boolean on all code paths.
The unreachable code is likely to do with the break statements.
If you're returning from each of the defined cases then the break statements after each return are never actually reached.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.