We're updating the issue view to help you get more done. 

Reflection incorrectly avoids "More than one matching method" exceptions

Description

From the google group:

The following correctly throws an IllegalArgumentException "More than one matching method" due to the nil resulting in ambiguity between two overloaded version of append.

1 2 3 4 5 (let [sb (StringBuilder.)] (.append sb nil))</code></pre>And yet the following, which uses reflection, works: <pre><code>(def s nil) (let [sb (StringBuilder.)] (.append sb s))

This is due to a divergence in method resolution between direct and reflected calls. Both examples should result in an exception due to ambiguity.

Environment

None

Status

Assignee

Rich Hickey

Reporter

import

Labels

None

Approval

None

Patch

None

Fix versions

Priority