diff --git a/test/sailcov/nested_mapping.sail b/test/sailcov/nested_mapping.sail new file mode 100644 index 000000000..d11a9b214 --- /dev/null +++ b/test/sailcov/nested_mapping.sail @@ -0,0 +1,22 @@ +default Order dec +$include + +union ast = { + B : (bool), + Z : unit +} + +mapping bool_not_bits : bool <-> bits(1) = { + true <-> 0b0, + false <-> 0b1 +} + +mapping encdec : bits(2) <-> ast = { + 0b1 @ bool_not_bits(s) if true <-> B(s), + 0b00 <-> Z() +} + +val main : unit -> unit +function main() = { + let _ = encdec(0b00) +}