grain
grain copied to clipboard
feat(compiler): Introduce warning if non-void expression value not used or ignored
The below code will now give a warning
let someThing = (value) => {
if (value) {
Ok("Good")
} else {
Err("Not good")
}
}
let f = () => {
someThing(false)
123
}
Let's land this in the next breaking so users aren't surprised by the warnings.
@alex-snezhko can you rebase this? Looks like the tests are failing on merge because of the LSP tests.
@ospencer rebased and fixed tests
@alex-snezhko looks like tests are failing because of formatting.