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

${arr[0]=1} change variable to string rather than assigning cell #660

Closed
andychu opened this issue Mar 15, 2020 · 1 comment
Closed

${arr[0]=1} change variable to string rather than assigning cell #660

andychu opened this issue Mar 15, 2020 · 1 comment

Comments

@andychu
Copy link
Contributor

andychu commented Mar 15, 2020

Thank you for the fix! But the fix c0f9c2f revealed another bug. See the following test case.

$ osh -c 'arr=(); echo ${#arr[@]}; : ${arr[0]=1}; echo ${#arr[@]}'
0
  arr=(); echo ${#arr[@]}; : ${arr[0]=1}; echo ${#arr[@]}
                                               ^~
[ -c flag ]:1: fatal: Can't index string with @

Originally posted by @akinomyoga in #653 (comment)

@andychu
Copy link
Contributor Author

andychu commented Mar 15, 2020

May relate to IR in #604 , e.g. sh_lhs_expr

andychu pushed a commit that referenced this issue Apr 6, 2020
And refactor _ApplyTestOp to use a mutating/appending style like the
rest of the WordEvaluator.
andychu pushed a commit that referenced this issue Apr 6, 2020
@andychu andychu closed this as completed Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant