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

Function calls with wrong number of arguments don't throw errors #10

Open
mateodif opened this issue Dec 28, 2023 · 1 comment
Open

Comments

@mateodif
Copy link

Describe the bug
In Clojure, calling a function with more arguments that it takes throws an ArityException. This is not the behavior experienced.

To Reproduce
In the REPL, try the following:

> (defn arity-test [n] (+ n n))
> (println (arity-test 1))
2
> (println (arity-test 1 1))
2

Expected behavior
In a Clojure REPL, do the same as above:

user=> (defn arity-test [n] (+ n n))
#'user/arity-test
user=> (arity-test 1)
2
user=> (arity-test 1 1)
clojure.lang.ArityException: Wrong number of args (2) passed to: user/arity-test [at <repl>:3:1]
user=>

However, I know that this project doesn't try to stay 1:1 with Clojure's behavior, so I'm left wondering if this is expected behavior or not :)

@Zelex
Copy link
Owner

Zelex commented Dec 31, 2023

Its expected for the moment. No exceptions here. I'll leave this issue open though for now.

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

2 participants