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
Spec section 7.6. Introducing new types mentions that type introduced by the type keyword is not a synonym with its underlying type.
type
However, tests psa-dpdk-binary-operations-1.p4, psa-dpdk-binary-operations.p4, psa-dpdk-header-union-typedef.p4, pins_fabric.p4. pins_middleblock.p4, and pins_wbb.p4 expect that new types can be implicitly cast to their underlying types.
For example,
// psa-dpdk-binary-operations-1.p4 typedef bit<32> PortIdUint_t; type PortIdUint_t PortId_t; struct psa_ingress_input_metadata_t { PortId_t ingress_port; // ... } control MyIC( inout ethernet_t a, inout metadata b, in psa_ingress_input_metadata_t c, inout psa_ingress_output_metadata_t d) { bit<8> Op1 = 0x2; bit<16> Op2 = 0x23; action forward() { b.meta = 32w0x1 << c.ingress_port; // c.ingress_port is of type PortId_t, should use (bit<32>) c.ingress_port instead. } // ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Spec section 7.6. Introducing new types mentions that type introduced by the
type
keyword is not a synonym with its underlying type.However, tests psa-dpdk-binary-operations-1.p4, psa-dpdk-binary-operations.p4, psa-dpdk-header-union-typedef.p4, pins_fabric.p4. pins_middleblock.p4, and pins_wbb.p4 expect that new types can be implicitly cast to their underlying types.
For example,
The text was updated successfully, but these errors were encountered: