Reflection warnings in defrecord (missing hint in core_deftype.clj?)

12 views
Skip to first unread message

Michał Marczyk

unread,
Jun 23, 2010, 11:17:52 AM6/23/10
to clo...@googlegroups.com
Hi,

just noticed that

(defprotocol Foo (foo [self]))
(defrecord Bar [x] Foo (foo [self] x))

gives a reflection warning -- "call to contains can't be resolved".

My initial guess is that this is due to a missing hint on line 215 in
core_deftype.clj.

Sincerely,
Michał

David Nolen

unread,
Jun 23, 2010, 11:21:35 AM6/23/10
to clo...@googlegroups.com
I've been seeing this as well.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

André Thieme

unread,
Jul 11, 2010, 6:22:53 AM7/11/10
to Clojure
On Jun 23, 5:17 pm, Michał Marczyk <michal.marc...@gmail.com> wrote:
> Hi,
>
> just noticed that
>
> (defprotocol Foo (foo [self]))
> (defrecord Bar [x] Foo (foo [self] x))
>
> gives areflectionwarning-- "call to contains can't be resolved".
>
> My initial guess is that this is due to a missing hint on line 215 in
> core_deftype.clj.


Yes, same here. A minimal example for the repl:
(do (set! *warn-on-reflection* true) (defrecord Foo [])) ==>
Reflection warning
Reply all
Reply to author
Forward
0 new messages