Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ERLANG-0.1
    • Component/s: Erlang
    • Labels:
      None
    • Number of attachments :
      0

      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
        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
        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
        Evgeny Mandrikov added a comment -

        Tested manually.

        Show
        Evgeny Mandrikov added a comment - Tested manually.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: