Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect message about unused variable #398

Open
kjetil-kilhavn opened this issue Jan 24, 2025 · 0 comments
Open

Incorrect message about unused variable #398

kjetil-kilhavn opened this issue Jan 24, 2025 · 0 comments

Comments

@kjetil-kilhavn
Copy link

kjetil-kilhavn commented Jan 24, 2025

For some reason ABAP Cleaner concludes that PARENT is not used in this code and adds a comment about unused variable as shown in the redacted excerpt.

    result = 99. "bottles of beer on the wall
    TRY.
        " TODO: variable is assigned but never used (ABAP cleaner)
        DATA(parent) = zif_team~get_parent_team( ).
        result = 10. "bottles of weissbier in the fridge ;-)
        DO.
          parent = parent->get_parent_team( ).
          result -= 1.
          IF result <= 1.
            EXIT.
          ENDIF.
        ENDDO.
      CATCH zcx_no_parent_team.
    ENDTRY.

ABAP Cleaner version 1.21.1
ABAP Development Tools Foundation version 3.46.2
Eclipse IDE version 4.34.0 (build ID 20241128-0757)

ABAP Platform 2023/02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant