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

Check 79 - CLEAR as first use of variable #944

Open
jrodriguez-rc opened this issue May 14, 2020 · 6 comments
Open

Check 79 - CLEAR as first use of variable #944

jrodriguez-rc opened this issue May 14, 2020 · 6 comments

Comments

@jrodriguez-rc
Copy link
Collaborator

Cleaning of variables is not checking correctly:
image

@larshp
Copy link
Owner

larshp commented May 14, 2020

to me it looks okay, not false positives

perhaps the line reported is wrong?

@jrodriguez-rc
Copy link
Collaborator Author

There are exactly those lines:
image

I declare attributes and first access to them is the CLEAR sentence

@larshp
Copy link
Owner

larshp commented May 14, 2020

yea, remove the CLEAR, it doesnt do anything, variables are initialized with initial value

@jrodriguez-rc
Copy link
Collaborator Author

I was trying with and without clear, without error still persists but only with lb_badi
image
I found the root of the cause, it is this block:
image

@larshp
Copy link
Owner

larshp commented May 14, 2020

can you help adding a full example with the code copy/pasta-ble?

@jrodriguez-rc
Copy link
Collaborator Author

This is the code:

    DATA: lb_badi TYPE REF TO /rslt/ui5_tile_info.

    TRY.
        GET BADI lb_badi
          FILTERS
            tile = lv_tile.
      CATCH cx_badi_not_implemented.
        CLEAR lb_badi.
    ENDTRY.

I just replaced the CLEAR for an exception

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

2 participants