Clojure

deftype print/read doesn't munge field names

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: Release 1.3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Example:

=> *clojure-version*
{:major 1, :minor 3, :incremental 0, :qualifier "beta1"}
=> (deftype P [a-b])
user.P
=> (P. "foo")
#<IllegalArgumentException java.lang.IllegalArgumentException: No matching field found: a-b for class user.P>

The field names being passed along to the reflector need to be munged properly in core_print.clj (line 246), and the Compiler needs to do the same in the IType block in ObjExpr.emitValue.

Activity

Hide
Chas Emerick added a comment -

I'll pick this up on Friday if no one else has by then.

Show
Chas Emerick added a comment - I'll pick this up on Friday if no one else has by then.
Chas Emerick made changes -
Field Original Value New Value
Assignee Chas Emerick [ cemerick ]
Hide
Chas Emerick added a comment -

deftype print-method and print-dup pulled per CLJ-812; this is no longer relevant.

Show
Chas Emerick added a comment - deftype print-method and print-dup pulled per CLJ-812; this is no longer relevant.
Chas Emerick made changes -
Status Open [ 1 ] Closed [ 6 ]
Resolution Declined [ 2 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: