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

Fix let function arguments not registering with the correct module name #159

Merged
merged 2 commits into from
Jun 17, 2023

Conversation

jfmengels
Copy link
Owner

@jfmengels jfmengels commented Jun 17, 2023

@r-k-b noticed a bug in the lookup table implementation:

module A exposing (..)
import B exposing (someValue)

a =
    let
        b someValue =
            someValue <-- This one
    in
    someValue

The module name for the someValue tagged above (inside the body of b) was resolved a [ "B" ], which is incorrect and should be [], as the parameter name shadows the import.

This PR fixes the issue by correctly considering let functions to have a scope with their own variable bindings.

@jfmengels jfmengels merged commit 929d850 into master Jun 17, 2023
@jfmengels jfmengels deleted the lookup-table-fix branch June 17, 2023 17:49
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.

1 participant