grain icon indicating copy to clipboard operation
grain copied to clipboard

feat(compiler): Introduce warning if non-void expression value not used or ignored

Open alex-snezhko opened this issue 1 year ago • 4 comments

The below code will now give a warning

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

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

alex-snezhko avatar Aug 14 '24 05:08 alex-snezhko

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

ospencer avatar Aug 31 '24 20:08 ospencer

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

ospencer avatar Sep 22 '24 14:09 ospencer

@ospencer rebased and fixed tests

alex-snezhko avatar Sep 22 '24 20:09 alex-snezhko

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

ospencer avatar Sep 22 '24 21:09 ospencer