google / google/xls

DSLX: Missing error check in proc member assignment

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

Description

I have a test proc :
```
#[test_proc()]
proc Proc {
terminator: chan out;
bar: chan out;

config(terminator: chan out) {
let (foo, baa) = chan;

(terminator, bar)
}

next(tok: token) { () }
}
```

Note that the channel is declared as "baa", but the member assignment is "bar". Instead of a ParseError, we get a
`Could not find slot or binding for name: bar @ foo.x:5:3-5:6` error. I suspect that the...parser? doesn't catch this error b/c "bar" is considered in scope of `config()`, but it shouldn't be.

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.