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

Generics extern object incorrectly allowed to have a direction in a control #3787

Closed
apinski-cavium opened this issue Dec 18, 2022 · 0 comments · Fixed by #3793
Closed

Generics extern object incorrectly allowed to have a direction in a control #3787

apinski-cavium opened this issue Dec 18, 2022 · 0 comments · Fixed by #3793
Assignees
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.

Comments

@apinski-cavium
Copy link

Take:

extern X<T> {}
extern Y {}
control c1(in Y x);
control c2(in X<bit> x);

P4C correctly rejects c1 but not c2.
I noticed this while testing testdata/p4_16_samples/generic.p4 with my front-end which has this bad code in it.

@apinski-cavium apinski-cavium changed the title Generics extern object allowed to have a direction Generics extern object incorrectly allowed to have a direction in a control Dec 18, 2022
@mihaibudiu mihaibudiu self-assigned this Dec 19, 2022
@mihaibudiu mihaibudiu added bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed. labels Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants