Clojure

Type-hinting a var with primitive array pseudo-class results in IllegalArgumentException when the var is used as an arg

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:

user=> (def ^longs la (long-array 0))
#'user/la
user=> (defn foo [] (alength la))
CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: clojure.core$longs@32dfcb47, compiling:(NO_SOURCE_PATH:9) 

Workaround: use the class string, e.g., ^"[J"

Activity

Ben Smith-Mannschott made changes -
Field Original Value New Value
Attachment CLJ-851-test.patch [ 10399 ]
Stuart Sierra made changes -
Resolution Declined [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
Stuart Halloway made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: