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

Unexpected behavior with wrong -main definition #454

Closed
martinklepsch opened this issue May 29, 2020 · 1 comment
Closed

Unexpected behavior with wrong -main definition #454

martinklepsch opened this issue May 29, 2020 · 1 comment

Comments

@martinklepsch
Copy link
Contributor

version 0.0.99

platform Mac

problem

A wrong -main definition (def instead of defn) causes the script to run as you would expect but then NPEs just before exiting.

repro

;; cat src/mkl/error.clj
(ns mkl.error)

(def -main []
  (println "abc"))
$ bb -cp src -m mkl.error
abc
java.lang.NullPointerException: [at line 1, column 34]

expected behavior

Fail completely I guess?

@borkdude
Copy link
Collaborator

We should fail with Too many arguments to def.

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