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

Check for valid argument count at compile-time #98

Open
cher-nov opened this issue Jan 21, 2021 · 0 comments
Open

Check for valid argument count at compile-time #98

cher-nov opened this issue Jan 21, 2021 · 0 comments

Comments

@cher-nov
Copy link
Member

cher-nov commented Jan 21, 2021

Consider next code:

show_debug_message(123);
execute_string("
    show_debug_message(321);
    show_message(0,1,2,3);  // intended to create compilation error
");

In GM this will fail at execute_string invocation, but only at show_message in gm8emu.
This can lead to behaviour differences when ignorable errors will be implemented.

It would be nice to deduce the number of arguments in some way, e.g. from the function signature.
This will prevent definition duplication and possible errors with distinction between numeric and literal counts (e.g. when number of arguments was specified as 5, but only 4 are specified in expect_args!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant