Skip to content

Conversation

@alex-snezhko
Copy link
Member

The below code will now give a warning

let someThing = (value) => {
  if (value) {
    Ok("Good")
  } else {
    Err("Not good")
  }
}

let f = () => {
  someThing(false)
  123
}

@ospencer
Copy link
Member

Let's land this in the next breaking so users aren't surprised by the warnings.

@ospencer ospencer added this pull request to the merge queue Sep 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 22, 2024
@ospencer
Copy link
Member

@alex-snezhko can you rebase this? Looks like the tests are failing on merge because of the LSP tests.

@alex-snezhko alex-snezhko force-pushed the alex/non-void-expr-warning branch from d6a6fd5 to dff6f7b Compare September 22, 2024 20:36
@alex-snezhko
Copy link
Member Author

@ospencer rebased and fixed tests

@ospencer
Copy link
Member

@alex-snezhko looks like tests are failing because of formatting.

@alex-snezhko alex-snezhko force-pushed the alex/non-void-expr-warning branch from dff6f7b to b55bd41 Compare September 22, 2024 21:17
Copy link
Member

@marcusroberts marcusroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, I like getting these warnings

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants