➜ pact wat.repl
:OutputFailure: pact/wat.repl:8:24: could not parse (contains target [WOT WAT]): in [WOT,WAT], type error: string vs [string] (CallStack (from HasCallStack): typeError, called at src-tool/Pact/Analyze/Parse/Prop.hs:762:22 in pact-4.11-inplace:Pact.Analyze.Parse.Prop)
Load successful
Expected Behavior
Replacing the (contains) with multiple equality checks works as expected, catching the error in (add-target):
wat.repl:8:24:OutputFailure: Invalidating model found in test.add-target
Program trace:
entering function test.add-target with argument
target = ""
insert into wat-table at key "wat" with { target: "" } succeeds
returning with "Write succeeded"
Issue description
I am unable to write an invariant in a defschema using the (contains) function as described in the documentation:
https://docs.kadena.io/pact/reference/properties-and-invariants/list-operators#containsh-567445985
Steps to reproduce
The below REPL file:
produces the following output:
Expected Behavior
Replacing the
(contains)
with multiple equality checks works as expected, catching the error in(add-target)
:This produces the expected output:
Debug Information
This is using Pact 4.11.