Description
The following code compiles, when it shouldn't:
import gleam/io
import gleam/result
pub fn main() {
use <<var:8>> <- result.try(wibble())
Ok(io.debug(var))
}
fn wibble() -> Result(BitArray, Nil) {
Ok(<<42, 0>>)
}
On Erlang, it will result in a runtime error, while on JS, it will just print 42
.
Gleam version 1.6.1