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
Below is the code example from spec section 8.24 explaining the operations on types that are type variables.
A local variable x of type T is defined inside the apply block of a control declaration.
controlC<T>() {
apply {
Tx; // the type of x is T, a type variable
}
}
However, section 14 on control block mentions that,
Unlike control type declarations, control declarations may not be generic
So the above example is an invalid P4 program where C is a generic control declaration (not a control type declaration).
I believe below example would be more appropriate for the purpose.
voidf<T>() {
Tx; // the type of x is T, a type variable
}
The text was updated successfully, but these errors were encountered:
Below is the code example from spec section 8.24 explaining the operations on types that are type variables.
A local variable
x
of typeT
is defined inside the apply block of a control declaration.However, section 14 on control block mentions that,
So the above example is an invalid P4 program where
C
is a generic control declaration (not a control type declaration).I believe below example would be more appropriate for the purpose.
The text was updated successfully, but these errors were encountered: