Clojure

"Second argument to def must be a Symbol" should say 'First argument'

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

See clojure/lang/Compiler.java, line 354 (in static class Parser, method parse())

> (def "hi" "there")
java.lang.Exception: Second argument to def must be a Symbol (NO_SOURCE_FILE:15)

The real problem the compiler means to say, is that "hi" is not a symbol, and that is the first argument to def.

Activity

Hide
Assembla Importer added a comment -

liwp said: [file:cu_tWuRS8r3RVoeJe5aVNr]: change the def exception message

Show
Assembla Importer added a comment - liwp said: [file:cu_tWuRS8r3RVoeJe5aVNr]: change the def exception message
Hide
Assembla Importer added a comment -

liwp said: (In [[r:6aab0f20e6bcc897b86a77b728af6fa0df93a2d8]]) Fix incorrect exception message when first argument to def is not a symbol - fix #175

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

Branch: master

Show
Assembla Importer added a comment - liwp said: (In [[r:6aab0f20e6bcc897b86a77b728af6fa0df93a2d8]]) Fix incorrect exception message when first argument to def is not a symbol - fix #175 Signed-off-by: Chouser <chouser@n01se.net> Branch: master

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: