Clojure

Classname/staticThing leaves Classname unresolved at syntaxQuote time

Details

  • Type: Defect Defect
  • Status: Closed 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

Activity

Hide
Assembla Importer added a comment -

chouser@n01se.net said: [file:bvQRQmB_Or3OXZeJe5aVNr]: Resolve classnames in modern-syntax static calls at syntaxQuote time.

Show
Assembla Importer added a comment - chouser@n01se.net said: [file:bvQRQmB_Or3OXZeJe5aVNr]: Resolve classnames in modern-syntax static calls at syntaxQuote time.
Hide
Assembla Importer added a comment -

chouser@n01se.net said: Attached patch as discussed in IRC.

Show
Assembla Importer added a comment - chouser@n01se.net said: Attached patch as discussed in IRC.
Hide
Assembla Importer added a comment -

chouser@n01se.net said: Child association with ticket #156 was added

Show
Assembla Importer added a comment - chouser@n01se.net said: Child association with ticket #156 was added
Hide
Assembla Importer added a comment -

chouser@n01se.net said: (In [[r:994f118c56bb3139f87093a6ec44eb8c04acbdaf]]) Resolve classnames in modern-syntax static calls at syntaxQuote time. Fixes #155

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master

Show
Assembla Importer added a comment - chouser@n01se.net said: (In [[r:994f118c56bb3139f87093a6ec44eb8c04acbdaf]]) Resolve classnames in modern-syntax static calls at syntaxQuote time. Fixes #155 Signed-off-by: Chouser <chouser@n01se.net> Branch: master

People

  • Assignee:
    Chouser
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: