We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I modified https://github.com/p4lang/p4c/blob/main/testdata/p4_16_samples/arith5-bmv2.p4:
action shift() { h.h.c = (int<64>)(h.h.a >> "aaaa"); sm.egress_spec = 0; }
Note that this code does not make any sense and should be rejected by the type checker. Howerver, it is not rejected:
$ ./build/p4c/p4test p4c/testdata/p4_16_samples/arith5-bmv2.p4 # [nothing, exitcode = 0]
If the shift is replaced with addition, the check works:
p4c/testdata/p4_16_samples/arith5-bmv2.p4(30): [--Werror=type-error] error: +: cannot be applied to expression '"aaaa"' with type 'string' { h.h.c = (int<64>)(h.h.a + "aaaa"); sm.egress_spec = 0; } ^
The text was updated successfully, but these errors were encountered:
type
vlstill
Successfully merging a pull request may close this issue.
I modified https://github.com/p4lang/p4c/blob/main/testdata/p4_16_samples/arith5-bmv2.p4:
Note that this code does not make any sense and should be rejected by the type checker. Howerver, it is not rejected:
$ ./build/p4c/p4test p4c/testdata/p4_16_samples/arith5-bmv2.p4 # [nothing, exitcode = 0]
If the shift is replaced with addition, the check works:
The text was updated successfully, but these errors were encountered: