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

add arity checking to native function calls in clox #10

Open
zxul767 opened this issue Nov 6, 2022 · 2 comments
Open

add arity checking to native function calls in clox #10

zxul767 opened this issue Nov 6, 2022 · 2 comments
Labels
bug Something isn't working p1

Comments

@zxul767
Copy link
Owner

zxul767 commented Nov 6, 2022

clock(1) should raise a runtime error saying that "expected 0 arguments but got 1"

@zxul767 zxul767 added the enhancement New feature or request label Nov 11, 2022
@zxul767
Copy link
Owner Author

zxul767 commented Dec 7, 2022

this is already implemented in jlox, but not in clox

@zxul767 zxul767 added bug Something isn't working p0 p1 and removed p0 labels Dec 7, 2022
@zxul767
Copy link
Owner Author

zxul767 commented Dec 7, 2022

marked as p1 and not p0 because nothing catastrophic happens if you pass more arguments than expected (although we haven't stressed tested to see if we can overflow the value stack)

@zxul767 zxul767 removed the enhancement New feature or request label Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p1
Projects
None yet
Development

No branches or pull requests

1 participant