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

Shadowed variable declarations get marked as unused. #136

Closed
rhdunn opened this Issue Nov 2, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@rhdunn

rhdunn commented Nov 2, 2015

Given:

let $foo := //foo
let $_ := for $foo in $foo return $foo/bar

The first instance of $foo gets marked as unused, when it should not. This applies more generally as well.

@ligasgr

This comment has been minimized.

Show comment
Hide comment
@ligasgr

ligasgr Nov 15, 2015

Owner

I understand that in this not too realistic but still possible scenario the first $foo is used as the collection in the for? (that's what all language implementations seem to think as well)
I'll try to have a look on how to improve the usage verification in such cases.

Owner

ligasgr commented Nov 15, 2015

I understand that in this not too realistic but still possible scenario the first $foo is used as the collection in the for? (that's what all language implementations seem to think as well)
I'll try to have a look on how to improve the usage verification in such cases.

@ligasgr ligasgr added the bug label Nov 15, 2015

@ligasgr

This comment has been minimized.

Show comment
Hide comment
@ligasgr

ligasgr Nov 19, 2015

Owner

Hi,

changes prepared should fix this issue and #140. I'll prepare more comprehensive suite of tests for those cases later. I've only fixed it for now for "for" and "let" bindings. If you can please try to find any additional scenarios with sliding/tumbling windows, group by, etc that would still require a fix and raise them as separate issue.

Owner

ligasgr commented Nov 19, 2015

Hi,

changes prepared should fix this issue and #140. I'll prepare more comprehensive suite of tests for those cases later. I've only fixed it for now for "for" and "let" bindings. If you can please try to find any additional scenarios with sliding/tumbling windows, group by, etc that would still require a fix and raise them as separate issue.

@ligasgr ligasgr closed this in c3096f2 Nov 19, 2015

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