-
Notifications
You must be signed in to change notification settings - Fork 107
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
Minor spec bugs #226
Comments
I think the Contains check should be something like:
For example, However, I was under the impression that you wanted |
I agree with both bugs; thank you for finding them. In fact, I believe the latter bug was what @waldemarhorwat was referring to in the 2021-08 plenary meeting:
I’ll try to deal with these two bugs at the same time. My plan is:
I think that’s all we need to do; both are pretty simple edits. I’ll try to get to fixing these sometime. |
In addition to function bodies, there are other productions that prevent the propagation of Contains, some of which need to be modified with some care. There is also a simpler problem I alluded to during the meeting: The definition of Contains has turned the script |
The syntax error appears due to the static semantics added in 5.1.1 of the current proposal, which turns scripts that use ^ as an xor operator into syntax errors. Another version of that error happens in CreateDynamicFunction. |
@waldemarhorwat: Excellent points; thank you. We probably would fix the latter problem by hiding So my plan is:
(FYI: We are talking about tentatively switching the spec back to |
The scope handling of the check for |
Fixes #226. The specification’s early errors were not updated for the new PipeBody : AssignmentExpression production. `a |> (x => %)` was incorrectly invalid because Contains always returned false for functions. The script `a % 2` was incorrectly invalid because Contains `%` is true for that script.
The current draft specification reads:
§1.2.1 (Static Semantics: Contains)
§4.2 (Pipe Operator)
§4.2.1 (Static Semantics: Early Errors)
Given my current understanding of how Static Semantics work, there's two issues here:
^
is always false, so any occurrence of the production PipeBody : PipeExpression would be a syntax error.I suspect the intention was to attach the semantics to PipeBody : AssignmentExpression instead and perform the Contains check on AssignmentExpression, but I'm not sure on this.
The text was updated successfully, but these errors were encountered: