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

Method retType

src/jvm/clojure/lang/Compiler.java:9236–9248  ·  view source on GitHub ↗
(Class tc, Class ret)

Source from the content-addressed store, hash-verified

9234 }
9235
9236 static Class retType(Class tc, Class ret){
9237 if(tc == null)
9238 return ret;
9239 if(ret == null)
9240 return tc;
9241 if(ret.isPrimitive() && tc.isPrimitive()){
9242 if((inty(ret) && inty(tc)) || (ret == tc))
9243 return tc;
9244 throw new UnsupportedOperationException("Cannot coerce " + ret +
9245 " to " + tc + ", use a cast instead");
9246 }
9247 return tc;
9248 }
9249
9250 public static Class primClass(Symbol sym){
9251 if(sym == null)

Callers 3

getJavaClassMethod · 0.80
getJavaClassMethod · 0.80
getJavaClassMethod · 0.80

Calls 2

intyMethod · 0.95
isPrimitiveMethod · 0.80

Tested by

no test coverage detected