Clojure

Method resolution does not select exact signature matches over tying

Details

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

Description

Given 3+ Java methods:

public static boolean someMethod (int a, int b) {
    return true;
}

public static boolean someMethod (int a, long b) {
    return true;
}

public static boolean someMethod (long a, long b) {
    return true;
}

and a Clojure call that matches one of them exactly:

(SomeClass/someMethod (long 1) (long 1))

the compiler yells at us:

More than one matching method found: someMethod

It turns out that Compiler.getMatchingParams is not clearing its "tied" flag when a later signature is an exact match.

Activity

Hide
Chas Emerick added a comment -

patch attached

Show
Chas Emerick added a comment - patch attached

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: