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

0 votes
in Clojure by

The compiler accepts this:

(deftype foo (link: )
clojure.lang.IFn
(invoke (link: this & xs)))

However calling ((foo.) :bar) will throw an AbstractMethodError. Wouldn't some checking be desirable?

5 Answers

0 votes
by

Comment made by: exi

This is a clone of http://dev.clojure.org/jira/browse/CLJ-1024 because the original with its attached patches was forgotten with the reason that "It has to wait and cannot be applied in 1.5" which is 2 major versions ago now, with 1.7 underway.

I would like to reopen it, or continue working on it in this ticket because i just stumbled over this issue the second time and the debugging sessions that follow this are annoying.

0 votes
by

Comment made by: jafingerhut

Fix Version/s was Release 1.5, but that field should only be set by Clojure screeners.

0 votes
by

Comment made by: exi

Yes, i just cloned the original issue. Later i realized that I'm unable to edit any of the fields.
The issue is just concerned with a missing warning/error when trying to compile protocols with "&" in the argument list as they are interpreted as a variable name "&" instead of a varargs placeholder which the user probably expects.

0 votes
by

Comment made by: michaelblume

Here's a forward-port of the 1024 patch

0 votes
by
...