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

return $x is too strict for libtool #914

Closed
andychu opened this issue Mar 24, 2021 · 2 comments
Closed

return $x is too strict for libtool #914

andychu opened this issue Mar 24, 2021 · 2 comments

Comments

@andychu
Copy link
Contributor

andychu commented Mar 24, 2021

Also reported on twitter

https://oilshell.zulipchat.com/#narrow/stream/121540-oil-discuss/topic/return.20.24var.20-.3E.20expected.20a.20number.3F

We could turn this check on only in shopt --set strict_arith, or maybe strict_integer or something

printf has a similar issue

andychu pushed a commit that referenced this issue Mar 26, 2021
Disallow them if shopt --set strict_control_flow.  Note that this option
is overloaded, but now documented.

Addresses issue #914.
@andychu
Copy link
Contributor Author

andychu commented Mar 26, 2021

@abathur This will be out with Oil 0.8.9

There is a subtlety in that return/break/continue are KEYWORDS in Oil, not builtins. So this is implemented in a way that's different than other shells, but it shouldn't matter to users.

If it does we can revisit later

@andychu
Copy link
Contributor Author

andychu commented Apr 13, 2021

@andychu andychu closed this as completed Apr 13, 2021
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