MCPcopy Index your code
hub / github.com/clojure/clojure / subsumes

Method subsumes

src/jvm/clojure/lang/Compiler.java:2984–3001  ·  view source on GitHub ↗
(Class[] c1, Class[] c2)

Source from the content-addressed store, hash-verified

2982
2983
2984static public boolean subsumes(Class[] c1, Class[] c2){
2985 //presumes matching lengths
2986 Boolean better = false;
2987 for(int i = 0; i < c1.length; i++)
2988 {
2989 if(c1[i] != c2[i])// || c2[i].isPrimitive() && c1[i] == Object.class))
2990 {
2991 if(!c1[i].isPrimitive() && c2[i].isPrimitive()
2992 //|| Number.class.isAssignableFrom(c1[i]) && c2[i].isPrimitive()
2993 ||
2994 c2[i].isAssignableFrom(c1[i]))
2995 better = true;
2996 else
2997 return false;
2998 }
2999 }
3000 return better;
3001}
3002
3003static String getTypeStringForArgs(IPersistentVector args){
3004 StringBuilder sb = new StringBuilder();

Callers 2

getMatchingParamsMethod · 0.95
matchMethodMethod · 0.95

Calls 1

isPrimitiveMethod · 0.80

Tested by

no test coverage detected