Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Violation of tuple type nesting rules #5086

Open
jaehyun1ee opened this issue Jan 6, 2025 · 0 comments
Open

Violation of tuple type nesting rules #5086

jaehyun1ee opened this issue Jan 6, 2025 · 0 comments
Labels
p4-spec Topics related to the P4 specification (https://github.com/p4lang/p4-spec/).

Comments

@jaehyun1ee
Copy link

According to the table in spec 7.2.8. Type nesting rules, types match_kind and int are disallowed within a tuple type.

However, tests issue3091-1.p4 and issue3091.p4 accepts match_kind in tuple as valid:

match_kind { exact }
const tuple<match_kind> exact_once = {exact};

And tests issue3238.p4, list3.p4, and list4.p4 accepts int in tuple as valid:

bit func(bit t1)
{
  tuple<int> t = {t1};
  return t[0];
}
@fruffy fruffy added the p4-spec Topics related to the P4 specification (https://github.com/p4lang/p4-spec/). label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-spec Topics related to the P4 specification (https://github.com/p4lang/p4-spec/).
Projects
None yet
Development

No branches or pull requests

2 participants