diff --git a/examples/acceptance_tests/097/lib/foo.ak b/examples/acceptance_tests/097/lib/foo.ak index 4888407f..18b9f753 100644 --- a/examples/acceptance_tests/097/lib/foo.ak +++ b/examples/acceptance_tests/097/lib/foo.ak @@ -22,3 +22,14 @@ test opaque_destructure() { quantity_a > 2 } + +test opaque_destructure2() { + let x = Value { inner: Dict { inner: [(#"", Dict { inner: [("ab", 3)] })] } } + + when x |> to_dict() |> to_list() is { + [] -> fail + [(policy_a, Dict{inner: []}), ..] -> fail + [(policy_a, Dict{inner: [(asset_name_a, quantity_a), ..]}), ..] -> + quantity_a > 2 + } +}