google / google/xls

Switching arguments to recv_if results in confusing error message

Open
#822 0 comments 0 reactions 0 assignees View on GitHub
dslx
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Interchanging the bool and channel in recv_if in DSLX results in an unhelpful message.

```
pub proc foo {
in_ch: chan in;
out_ch: chan out;

init { () }

config () {
let (i, o) = chan;
(i, o)
}

next(tok: token, state: ()) {
let (tok, _) = recv_if(tok, false, in_ch);
let tok = send(tok, out_ch, true);
()
}
}
```

```
$ bazel-bin/third_party/xls/dslx/interpreter_main input.x
...
E0113 14:22:29.462753 2783768 deduce.cc:2217] INTERNAL: XLS_RET_CHECK failure (third_party/xls/dslx/deduce.cc:2217) index != nullptr
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.