bug? outdated exception message text?

14 views
Skip to first unread message

jon

unread,
Mar 9, 2008, 12:41:06 AM3/9/08
to Clojure
Using SVN 724.
Question.. should this error message say "expecting (set! target
val)" ?

(def *v1*)
(binding [*v1* 99]
(set! *v1* 98 97))

java.lang.IllegalArgumentException: Malformed assignment, expecting (=
target val)
at clojure.lang.Compiler$AssignExpr$Parser.parse(Compiler.java:353)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:3239)
... 31 more

Thanks, Jon

jon

unread,
Mar 11, 2008, 3:12:14 PM3/11/08
to Clojure
Hi Rich..
Is this another small inaccuracy that I've noticed?

I'm guessing it's because clojure.lang.RT.init() loads all 5 .clj's,
but only sets up boot.clj as the 'source' that the following exception
seems to imply that (startparse-sax ...) is defined in boot.clj rather
than xml.clj.

user=> (xml/startparse-sax 1 2)
java.lang.IllegalArgumentException: No matching method found: parse
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:59)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:26)
at clojure.fns.xml.startparse_sax__940.invoke(boot.clj:770)
at clojure.lang.AFn.applyToHelper(AFn.java:175)
at clojure.lang.AFn.applyTo(AFn.java:164)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:2306)
at clojure.lang.Compiler.eval(Compiler.java:3269)
at clojure.lang.Repl.main(Repl.java:64)

Thanks.. Jon
ps.I'm happy about the recent name propogation fixes.. keep up the
great work :) :)

Rich Hickey

unread,
Mar 11, 2008, 5:22:10 PM3/11/08
to Clojure


On Mar 11, 3:12 pm, jon <superuser...@googlemail.com> wrote:
> Hi Rich..
> Is this another small inaccuracy that I've noticed?
>
> I'm guessing it's because clojure.lang.RT.init() loads all 5 .clj's,
> but only sets up boot.clj as the 'source' that the following exception
> seems to imply that (startparse-sax ...) is defined in boot.clj rather
> than xml.clj.
>

Fixed - thanks for the report.

BTW, I'm aware of the line numbers still being off when the problem is
in a macro call (you get the file of the call, but the line of the
macro source, usually boot.clj).

Rich
Reply all
Reply to author
Forward
0 new messages