pact
pact copied to clipboard
Capabilities that return `false` should fail
The following call to f
currently does not fail because we disregard BAR
's return value (and always return true
) and end up evaluating (enforce true "...")
(module m 'keyset
(defcap BAR ()
false)
(defcap FOO ()
(enforce (compose-capability (BAR)) "BAR returned false"))
(defun f:bool ()
(with-capability (FOO)
true))
)
This call to f
should fail due to passing false
to enforce
.
@slpopejoy
@bts do you mind pulling master and checking to see this is fixed as of https://github.com/kadena-io/pact/pull/411 ?
@emilypi just rebuilt on master and confirmed that this is still an issue
The real issue here is that the bool
return type on defcaps is throwaway.
Propose instead we fail a defcap test if it returns anything but true
.