You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please create a rule that flags a problem for recursive calls that do not have a condition.
Code Sample:
The following code will cause a StackOverflowError.
void sum(int count)
{
return sum(count - 1);
}
The following code may still cause a StackOverflowError depending on the parameter but if the parameter is not too large then it will terminate. However, since there is a condition, then this is "correct" code.
Proposed Rule Name: UnconditionalRecursion
Proposed Category: Bug
Description:
Please create a rule that flags a problem for recursive calls that do not have a condition.
Code Sample:
The following code will cause a
StackOverflowError
.The following code may still cause a
StackOverflowError
depending on the parameter but if the parameter is not too large then it will terminate. However, since there is a condition, then this is "correct" code.Possible Properties:
Can you think of some properties?
The text was updated successfully, but these errors were encountered: