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

local variables which are defined & re-assigned in a function are shown to be accessible globally #1166

Open
ShadowCreator250 opened this issue May 23, 2024 · 0 comments

Comments

@ShadowCreator250
Copy link

Code editor

VSCode v1.89.1

Platform

Win10

Version

[email protected]

What steps will reproduce the bug?

my_function() {
	local _my_var="test"
	_my_var=42
}

$<auto-completion here, e.g. Ctrl+Space>

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

_my_var should not show up in the auto-completion dialog because it was created locally

What do you see instead?

_my_var is shown to be supposedly accessible
picture proof

Additional information

expected behaviour is described e.g. here: https://stackoverflow.com/a/22527475

@ShadowCreator250 ShadowCreator250 changed the title local variables which are defined & re-assigned in a function are shown to be a accessible globaly local variables which are defined & re-assigned in a function are shown to be accessible globally May 23, 2024
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