You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// tuple3.p4consttuple<bit<32>, bit<32>> t = { 0, 1 };
constbit<32> f = t[0];
How about adding the following cases to the list in 18.1?
For a field access, accessing a field of a local compile-time known / compile-time known expression results in a local-compile time known / compile-time known value, respectively.
For indexing a tuple-type expression,
index \ tuple
local compile-time known
compile-time known
local compile-time known
local compile-time known
compile-time known
compile-time known
compile-time known
compile-time known
The text was updated successfully, but these errors were encountered:
The extra cases of compile-time known and local compile-time known values that you list look correct to me, and seem reasonable to explicitly document in the spec.
Section 18.1 lists compile-time known and local compile-time known values.
The list does not include field access with
.
and index access with[ ]
.But there are use cases in the p4c test suite that expects such.
How about adding the following cases to the list in 18.1?
For a field access, accessing a field of a local compile-time known / compile-time known expression results in a local-compile time known / compile-time known value, respectively.
For indexing a tuple-type expression,
The text was updated successfully, but these errors were encountered: