Skip to content

Conversation

@magancarz
Copy link

This PR fixes the bug mentioned in #3746 and allows more complex final expressions in proc's config function by skipping the tuple check in parser.cc.

config() {
const if A == u32:5 {
let (first_output, first_input) = chan<()>("first");
(first_input)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should be (first_input,) to make it a tuple

input: chan<()> in;
output: chan<()> out;
config() {
const if A == u32:5 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add additional tests with a non-const if. Since the parser doesn't require the tuple any more let's make sure the type checker will.

}

)",
TypecheckFails(HasTypeMismatch("(chan<()> in, chan<()> out)", "chan<()> in")));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add additional tests for channel type mismatch within the const if tuple, e.g., chan<u32> vs chan<()>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants