ecmarkup icon indicating copy to clipboard operation
ecmarkup copied to clipboard

Completion record linting doesn't work quite right with parentheses

Open ptomato opened this issue 1 year ago • 9 comments

In Temporal I have an operation RoundDuration which returns "either a normal completion containing a Record with fields [[DurationRecord]] (a Duration Record) and [[Total]] (a mathematical value), or a throw completion". I'm trying to access one of the fields on the returned Record without making an intermediate binding:

  1. Let result be (? RoundDuration(arguments)).[[DurationRecord]].

This results in the error "RoundDuration returns a Completion Record, but is not consumed as if it does" from ecmarkup.

Changing it to this makes the error go away:

  1. Let roundRecord be ? RoundDuration(arguments).
  2. Set result to roundRecord.[[DurationRecord]].

ptomato avatar Jun 16 '23 13:06 ptomato