Clojure

Include argument type info in reflection warnings and method signatures in dispatch compilation errors

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: Release 1.3
  • Fix Version/s: Release 1.4
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

Errors like:

More than one matching method found: foo

are bad, especially when there are multiple overloads and the types of one's arguments aren't immediately obvious. In addition, reflection warnings like:

Reflection warning, %s:%d - call to %s can't be resolved

are similarly unhelpful.

The above should be modified to include as much type information as possible, i.e.:

More than one matching method found: foo(long[], int, int) and foo(long[], long, int) for arguments of type (long[], long, long)

Reflection warning, %s:%d - call to %s can't be resolved with arguments of type (clojure.lang.PersistentVector, String, int)

Such ideas were briefly discussed here.

Activity

Hide
Chas Emerick added a comment -

Note that the attached patch (incidentally) depends on the patch for CLJ-789.

Show
Chas Emerick added a comment - Note that the attached patch (incidentally) depends on the patch for CLJ-789.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: