mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 19:10:28 +03:00
5c12d757f4
* Add a guard when exercising by interface. This fixes part of #11703, when exercising an inherited choice by interface and you know the template id, via the command preprocessor. It does this by inserting a "guard" in between the interface fetch and the exercise body. The guard is a function Interface -> Bool, which is general enough to check the template id, without complicating too much in speedy. And can be generalized in the future to check more, like signatories, etc. I added the guard as an optional argument to UExerciseByInterface. This isn't hooked up to the protobuf AST yet (or Haskell side for that matter) -- but I'll do it in the next PR! For now you can invoke the guarded exercise via the command preprocessor, so I can enable the approprate engine tests. (There's still some failing fetch tests left, but I decided to leave this for later. Fetch can be a lot simpler than guarded choices, since you always add a fetch node. No need for fancy continuations.) changelog_begin changelog_end * scalafmt * Feedback and fix matches * Update comments, we are always going to abort the transaction * Raise WronglyTypedContract in SBGuardTemplateId. * rebase and fix parser * restore ANF * scalafmt |
||
---|---|---|
.. | ||
bench/com/daml/lf/interpreter | ||
main/scala/com/digitalasset/daml/lf | ||
test/scala/com/digitalasset/daml/lf/speedy |