-
Notifications
You must be signed in to change notification settings - Fork 80
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
Clarification on directionless action arguments behaving like direction in #1350
Comments
Would it address your question fully if we were to replace this text of the spec:
with something like the following?
|
Yes, I think it addresses my question :) Would it be alright if I create a PR based on your suggestion? |
Certainly. Please do. |
I just found out that I overlooked the spec saying:
So it was stated that a directionless action argument need not be compile-time known. |
It is a small enough detail that it is easy to miss (I did in my comment above -- good that you found it later). Perhaps it would be more appropriate to file a bug against p4c, then, if it does not follow the spec? |
I believe so. Closing in favor of p4c issue! |
The spec mentions about directionless action arguments:
The phrase "behaves as if the direction were
in
", I believe, is not quite clear, particularly regarding compile-time known-ness.The differences between an
in
parameter and a directionless parameters, aside their copy-in/out semantics, is:in
can be implicitly cast, while directionless cannot (as per the current spec)in
argument.So, I wonder if "behaves as if the direction were
in
" also imply that the directionless arguments supplied to actions in a P4 program (not by the control plane) need not be a compile-time known value?Relevant to this issue,
issue473.p4
in the p4c test suite is expected to be rejected by the frontend.The text was updated successfully, but these errors were encountered: