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

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: