Varargs protococol impls can be defined but not called

Description

The compiler accepts this:

(deftype foo []
clojure.lang.IFn
(invoke [this & xs]))

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

Environment

None

Attachments

1

Activity

Show:

Tassilo Horn February 14, 2013 at 4:03 PM

@Marek, Stu: Thanks, I've left a reply there: https://groups.google.com/d/msg/clojure-dev/qjkW-cv8nog/rMNFqbjNj-EJ

Marek Srank February 14, 2013 at 2:52 PM

@Tassilo: https://groups.google.com/forum/#!topic/clojure-dev/qjkW-cv8nog

Tassilo Horn February 14, 2013 at 7:36 AM

Hey Stu, do you mind to explain why you've declined the patch?

Tassilo Horn August 31, 2012 at 2:03 PM

Hi Victor, this revamped patch removes the double-negation and is more concise and clearer as a result. So your comment wasn't as silly as you thought.

import August 31, 2012 at 1:11 PM

Comment made by: vemv

Pardon the silly contribution, but the added methods' usage of double-negations (when-not ...) seems unnecessary.

Declined

Details

Assignee

Reporter

Patch

Priority

Affects versions

Fix versions

Created July 10, 2012 at 4:09 PM
Updated February 14, 2013 at 4:03 PM
Resolved February 14, 2013 at 4:03 PM