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

[pysrc2cpg] Fix captured variable linking into class scopes. #5129

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

ml86
Copy link
Contributor

@ml86 ml86 commented Nov 25, 2024

The linking of captured variables was not yet working if variables from
outside of a class have been captured into methods of a class.
This was the case because of a possible name clashes between those
captured variables and variables inside of the class body methods.
To avoid such clashes captures variables get a <captured> prefix
inside the class body methods.
This solves a long standing issue where data flows via such captured
variables were not found.

@ml86 ml86 requested a review from maltek November 25, 2024 11:12
The linking of captured variables was not yet working if variables from
outside of a class have been captured into methods of a class.
This was the case because of a possible name clashes between those
captured variables and variables inside of the class body methods.
To avoid such clashes captures variables get a `<captured>` prefix
inside the class body methods.
This solves a long standing issue where data flows via such captured
variables were not found.
@ml86 ml86 force-pushed the markus/pysrc2cpgFixes branch from 8055a35 to d346f32 Compare November 25, 2024 11:49
@ml86 ml86 merged commit 466e763 into master Nov 25, 2024
5 checks passed
@max-leuthaeuser max-leuthaeuser deleted the markus/pysrc2cpgFixes branch November 25, 2024 12:37
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

Successfully merging this pull request may close these issues.

2 participants