C
codymanix
No, I don't want to tell the compiler to stop emitting that warning
I noticed that I wrote Bullshit. Here are my corrected rules for recursive
calls:
- If the call to itself is the first method call in the method the compiler
should issue an error.
- If the call to itself is only preceeded by method/property invocations
than the compiler should only issue a warning.
- If the call to itself is in a condional statement (loop/if), or a return
or throw or precedes the recursive call, then no warning is issued.
It is similar to the warning "Unreachable code detected", but the other way
around: if the call to itself is reached in _every case_ then a warning
should be issued.
entirely though - I just want to *always* be able to describe
reasonable code in a way that doesn't cause the compiler to warn me in
the first place.
I noticed that I wrote Bullshit. Here are my corrected rules for recursive
calls:
- If the call to itself is the first method call in the method the compiler
should issue an error.
- If the call to itself is only preceeded by method/property invocations
than the compiler should only issue a warning.
- If the call to itself is in a condional statement (loop/if), or a return
or throw or precedes the recursive call, then no warning is issued.
It is similar to the warning "Unreachable code detected", but the other way
around: if the call to itself is reached in _every case_ then a warning
should be issued.