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
legal casts #177
Comments
I think that this claim is not implemented as described in the compiler. Indeed, the type of a ListExpression in the compiler is a tuple, and we allow tuples to be assigned to structs and headers. We have an open issue about assigning lists to headers. So this paragraph has to be expanded. |
Indeed. Now we have a placeholder so we don't forget to address this. |
We should assign these issues to people to make sure they are covered. |
We should also forbid casts that do not involve only base types. |
Currently we write:
But we allow tuples and lists to be assigned to struct/headers. So it seems that this should be generalized to struct/header/tuple/lists too?
FWIW, the implementation is stricter than I'd expect as a programmer:
p4lang/p4c#529
The text was updated successfully, but these errors were encountered: