Closed boxbeam closed 1 year ago
Type match macro is used like this:
type_match!(a, b { (List(a), List(b)) => Ok(FenderValue::Int(0).into()), (Int(a), Int(b)) => Ok(FenderValue::Int(a + b).into()) });
It will work like a normal match statement for the listed branches, and also generates a nice informative error message for invalid argument types
Type match macro is used like this:
It will work like a normal match statement for the listed branches, and also generates a nice informative error message for invalid argument types