Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.1
-
Component/s: None
-
Labels:None
-
Approval:Ok
Description
Class names for static field and method references are resolved differently for modern vs. old syntax:
user=> `(Integer/foo) (Integer/foo) user=> `(. Integer foo) (. java.lang.Integer user/foo)
This means that using an imported class in a defmacro via modern syntax will break if the macro is expanded in a namespace that doesn't have that class imported, or worse could attempt to a same-named class from a different package.
Reported by technomancy in IRC
Converted from http://www.assembla.com/spaces/clojure/tickets/155
Attachments:
ticket-155.diff - https://www.assembla.com/spaces/clojure/documents/bvQRQmB_Or3OXZeJe5aVNr/download/bvQRQmB_Or3OXZeJe5aVNr