Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

Example:

(deftype Foo [a b] Object (bar [] 123))

It should give the error pointing to line 3, with a message like "Methods in a deftype require at least one argument". Instead it gives a massive stacktrace, with a NullPointerException, and points to line 1.

It was hard to find the line of the error, but it was buried in the stack trace. Ideally that would also be easier to see.

7 Answers

0 votes
by

Comment made by: mfikes

The error message generated by CLJS-3070.patch matches that for Clojure.

For the example in this ticket's description:

Must supply at least one argument for 'this' in: bar

0 votes
by

Comment made by: mfikes

CLJS-3070-2.patch is the same as CLJS-3070.patch, but characterizes it as a syntax error and suppresses any arity mismatch warnings (thus behaving more like Clojure).

0 votes
by

Comment made by: mfikes

CLJS-3070-3.patch cleans things up to make it follow the conventional way this is handled in other parts of the code.

0 votes
by

Comment made by: mfikes

CLJS-3070-3.patch passes CI (/)

0 votes
by

Comment made by: mfikes

CLJS-3070-3.patch added to Patch Tender (i)

0 votes
by

Comment made by: mfikes

CLJS-3070-3.patch passes Canary (/)

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-3070 (reported by alex+import)
...