summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jvm/clojure/lang/Compiler.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java
index c5781106..673f5a06 100644
--- a/src/jvm/clojure/lang/Compiler.java
+++ b/src/jvm/clojure/lang/Compiler.java
@@ -1898,6 +1898,7 @@ static int getMatchingParams(String methodName, ArrayList<Class[]> paramlists, I
throws Exception{
//presumes matching lengths
int matchIdx = -1;
+ boolean tied = false;
for(int i = 0; i < paramlists.size(); i++)
{
boolean match = true;
@@ -1915,12 +1916,18 @@ static int getMatchingParams(String methodName, ArrayList<Class[]> paramlists, I
else
{
if(subsumes(paramlists.get(i), paramlists.get(matchIdx)))
+ {
matchIdx = i;
+ tied = false;
+ }
else if(!subsumes(paramlists.get(matchIdx), paramlists.get(i)))
- throw new IllegalArgumentException("More than one matching method found: " + methodName);
+ tied = true;
}
}
}
+ if(tied)
+ throw new IllegalArgumentException("More than one matching method found: " + methodName);
+
return matchIdx;
}