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 argument counts for user-defined functions #352

Open
obycode opened this issue Feb 26, 2024 · 1 comment
Open

Check argument counts for user-defined functions #352

obycode opened this issue Feb 26, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@obycode
Copy link
Collaborator

obycode commented Feb 26, 2024

The type-checker will not report an error on a contract like this, where there is a problem with the number of arguments being passed to a user-defined function. clar2wasm needs to check for this during compilation.

(define-public (simple (a int) (b int) (c int))
  (ok (+ a b))
)

(define-public (call-it)
  (simple 1 2)
)
@moodmosaic
Copy link
Member

@obycode, I've added stacks-network/stacks-core#4431 in stacks-core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

3 participants