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

label_var_same_name triggered for non-static members in static functions #938

Open
0xEAB opened this issue Oct 14, 2023 · 1 comment
Open

Comments

@0xEAB
Copy link

0xEAB commented Oct 14, 2023

dscanner.suspicious.label_var_same_name triggers here:

struct Foo {
    long line = 1;

    static void bar() {
        long line = 1; // Variable "Foo.line" has the same name as a variable defined on line 2.
    }
}

Does this make sense?
Be that as it may, the message doesn’t do so.

@WebFreak001
Copy link
Member

I think for static functions/structs we could add a special case, since the user might redefine these fields to pass them in from outside

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

No branches or pull requests

2 participants