-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completion record linting doesn't work quite right with parentheses #529
Comments
This needs some changes in callers because of a bug in Ecmarkup (see tc39/ecmarkup#529), but I think the change is probably for the better anyway.
Why are the parens needed at all in the first case? The question mark should attach to the AO call, not the field value. |
... Why? That's not the obvious-to-me parse of that expression. (Compare e.g. |
This needs some changes in callers because of a bug in Ecmarkup (see tc39/ecmarkup#529), but I think the change is probably for the better anyway.
There are two examples in the spec where the operand of
In each case, the intended parse is |
I think I can fix this easily enough, but to be honest the extra binding seems like a good thing from a readability point of view, so I'm probably not going to prioritize it right away. |
@bakkot because i don’t expect completion records to be stored in record fields, but i do expect them to be the result of an AO call. I don’t think JS has a comparison because completion records are so weird a concept. |
Completion records can be stored in record fields. They're just a value like any other. |
Sure, that's just not something we ever do, afaik, hence my expectation. |
I already gave an example where we do that: the |
Ah, fair enough. My expectation still holds, and using parens should ofc work, and i agree the separate alias is cleaner. |
This needs some changes in callers because of a bug in Ecmarkup (see tc39/ecmarkup#529), but I think the change is probably for the better anyway.
This needs some changes in callers because of a bug in Ecmarkup (see tc39/ecmarkup#529), but I think the change is probably for the better anyway.
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:
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:
The text was updated successfully, but these errors were encountered: