This is  nothing to worry about, but it does seem to be something that can
be improved in clojure.  I submitted a patch with a simple fix:
http://www.assembla.com/spaces/clojure/tickets/171-reflection-warning-from-ns

There is a more complex fix that could be made to the clojure compiler so it
would check for both methods and fields before giving the warning.  The
InstanceFieldExpr prints this warning because it only checks for a field
with the given name.  However, when it evals, it first looks for a method,
then a field.  If it did that in the first place, there would be no warning,
not just for ns, but user code also.  Should a ticket be filed?

-Mike

On Wed, Aug 5, 2009 at 9:11 AM, Laurent PETIT <laurent.pe...@gmail.com>wrote:

> 2009/8/5 John Harrop <jharrop...@gmail.com>
>
>> On Tue, Aug 4, 2009 at 7:46 PM, Vagif Verdi <vagif.ve...@gmail.com>wrote:
>>
>>>
>>> When reflection warning is on, i get 2 warnings on every my file:
>>>
>>> reference to field getClass can't be resolved.
>>
>>
>> That one is very weird, because getClass is a method of java.lang.Object.
>> It should always be possible to resolve that one without reflection.
>>
>
> getClass is a method ...
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to