Skip to content
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

'foo'[::-1].length(@) should evaluate to 3 #18

Closed
springcomp opened this issue May 1, 2023 · 0 comments
Closed

'foo'[::-1].length(@) should evaluate to 3 #18

springcomp opened this issue May 1, 2023 · 0 comments

Comments

@springcomp
Copy link
Contributor

springcomp commented May 1, 2023

In most implementations, the rhs of a sub-expression is implemented differently when the lhs is a projection.
Due to the shape of the AST, the lhs is actually evaluated on the lhs projection.

However, when slicing a string, the rhs should be treated as a regular sub-expression.

As a result, in most implementations, the following expression does not evaluate correctly:

  • 'foo'[::-1].length(@) should evaluate to 3.

In some implementations, the result is ``"oof"ornull`.

Please, consider adding a compliance test.

springcomp added a commit that referenced this issue May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant