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

Functions can have junk extra args passed #171

Open
Demorome opened this issue Aug 12, 2023 · 0 comments
Open

Functions can have junk extra args passed #171

Demorome opened this issue Aug 12, 2023 · 0 comments

Comments

@Demorome
Copy link
Contributor

Demorome commented Aug 12, 2023

Since this seems like a doozy to fix rn, I'm keeping this issue tracked for later.

Issue is: Inside vanilla (non-eval) if-checks, you can pass as many args as you want to a function and it'll compile in a messed up state, crashing the script. Probably a vanilla bug.

However, a probably separate instance of the same bug happens inside inline expressions, though when compiling it luckily ignore the extra args and behaves fine otherwise. Still, it should probably warn users they're passing too many args there.

ExpressionParser::ParseArgs probably mishandles it for inline expressions (?). Code's a bit dense and recursive though.

Here's a script file with all the test cases I've written, commented-out text won't compile.
TestPassingExtraArgBug.txt

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