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

NoSimpleLetBody should not report errors for a variable that is referenced outside of the body #4

Open
jfmengels opened this issue Sep 13, 2022 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jfmengels
Copy link
Owner

jfmengels commented Sep 13, 2022

fn value =
  let
    a =
      something

    something =
      1
  in
  something
--> should NOT transform to
fn value =
  let
    a =
      something
  in
  1

The above should not be reported. Even though a is necessarily unused (at least for the current implementation), it may still exist for a bit, which will cause the code not to compile anymore. It's likely that NoUnused.Variables is enabled and will fix the issue anyway, but we shouldn't rely on this.

@jfmengels jfmengels added bug Something isn't working help wanted Extra attention is needed labels Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant