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

hanging code in assert_create #128

Closed
selkamand opened this issue Nov 13, 2024 · 0 comments · Fixed by #130
Closed

hanging code in assert_create #128

selkamand opened this issue Nov 13, 2024 · 0 comments · Fixed by #130

Comments

@selkamand
Copy link
Owner

In assert create there is this section of code

if(func_arg_count(func) == 0){
    if (func_supports_variable_arguments(func))
      additional_note = " (Note '...' does NOT count as an argument)"
    else additional_note = ""

    cli::cli_abort("`{function_name}` must have at least 1 paramater to be used in `assert_create`{additional_note}")
  }

Since func_arg_count will actually error because with default settings it doesn't know how to count function arguments when ... is present. This means the additional note is actually impossible to reach.

To fix and get the code running as intended, we can set dots="count_as_0"

selkamand added a commit that referenced this issue Nov 13, 2024
@selkamand selkamand linked a pull request Nov 13, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant