`fail!()` in proc gives internal error
Open
dslx
estimate:M
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
Reported by mtikekar@
https://groups.google.com/g/xls-dev/c/LgPOsMdDG2w/m/vi2ty7idBgAJ?utm_medium=email&utm_source=footer
```dslx
fn out_fn(x: u32, state: u32) -> u32 {
match x {
u32:0 => fail!("bad_x", state),
_ => x + state
}
}
proc Fmac {
input_a_consumer: chan in;
output_producer: chan out;
init { u32:0 }
config(input_a_consumer: chan in, output_producer: chan out) {
(input_a_consumer, output_producer)
}
next(tok: token, state: u32) {
let (tok, input_a) = recv(tok, input_a_consumer);
let result = out_fn(input_a, state);
let tok = send(tok, output_producer, result);
result
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.