Details

      Description

      Create a rule to check is the method tail recursive:
      it is tail recursive if the last statement is a return or a recursive call
      (handle branches)

        Activity

        Hide
        kalidasya Tamas Kende added a comment -

        The logic is the following:
        if the arity of the actual call is equal to the arity of the actual function and there is no non tail recursive call registered in that function clause we check the following:

        • is the function call a direct child of an expression (so it is a standalone statement)
        • does any of the ancestor statement has a sibling statement (so it is not the last statement)
        Show
        kalidasya Tamas Kende added a comment - The logic is the following: if the arity of the actual call is equal to the arity of the actual function and there is no non tail recursive call registered in that function clause we check the following: is the function call a direct child of an expression (so it is a standalone statement) does any of the ancestor statement has a sibling statement (so it is not the last statement)
        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        Tested manually.

        Show
        godin OLD - Evgeny Mandrikov added a comment - Tested manually.

          People

          • Assignee:
            kalidasya Tamas Kende
            Reporter:
            kalidasya Tamas Kende
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: