Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Wrongful detection of CallOfParameter for function calls with the same name as a parameter #298

@lukarade

Description

@lukarade

Describe the bug

If a function is called inside another function, which by chance defines a parameter with the same name as the called function, a CallOfParameter is falsely added to the reasons of the calling function.

Example

def foo():
    pass

def bar(foo):
    foo() # Wrong CallOfParameter: Here the function foo is called, which is pure

To Reproduce

  1. Copy the example into the test file for testing the purity analysis
  2. Run the tests

Expected behavior

For such cases, a special condition must be implemented to check if the function or the parameter is referenced.

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't workingpurityInferring the purity of functions

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions