Clojure

definterface/gen-interface do not support array parameter and return types

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: Release 1.2
  • Fix Version/s: Release 1.3
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code
  • Approval:
    Ok

Description

As describe in this clojure-dev post, gen-interface and definterface do not properly support array type hints.

Ultimately, this is because gen-class and gen-interface use two different code paths to do essentially the same thing. Boiled down, gen-class converts hints using (Type/getType (the-class c)), whereas gen-interface uses asm-type, which uses similar, but different, logic than the-class.

In my patch, I change asm-type to match use the-class. I also add entries to the prim->class map to support primitive arrays.

Activity

Hide
Daniel Solano Gómez added a comment -

An updated patch that includes tests for the new functionality.

Show
Daniel Solano Gómez added a comment - An updated patch that includes tests for the new functionality.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: