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

+1 vote
in Errors by

I had a syntax error in a reify form today and the error was pretty cryptic:

(defprotocol Foo
  (foo [a]))

(reify Foo
  (foo a
    (inc a)))

Produces the following error:

Syntax error (IllegalArgumentException) compiling at (REPL:1:1).
Don't know how to create ISeq from: clojure.lang.Symbol

It would be beneficial if the error message contained the word reify and foo as breadcrumbs, that would have lead me to identify the error more easily.

Also the line number of a column are incorrect - they refer to the position of the opening paren of the reify form (line 1, column 1) whereas my error is on line 2, column 7.

Thinking about a better message, something like:

> Syntax error in reify form – found symbol 'a' when expecting an argument list.

1 Answer

+1 vote
selected by