compiler, runtime: Make Default Values Optional
For types, make it optional to return a default value. While default values for some types are meaningful, they are not meaningful for all types (e.g., Action, Control, Parser, Parser state, etc.). Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -36,7 +36,7 @@ public protocol EvaluatableStatement {
|
||||
|
||||
public protocol P4Type: CustomStringConvertible {
|
||||
func eq(rhs: any P4Type) -> Bool
|
||||
func def() -> P4DataValue
|
||||
func def() -> P4DataValue?
|
||||
}
|
||||
|
||||
public protocol P4DataValue: CustomStringConvertible {
|
||||
|
||||
Reference in New Issue
Block a user