title: Clojure static typing, part 2
body: <p>This is a follow-up to <a href="https://stackoverflow.com/questions/4184665/clojure-static-typing">my previous question</a> on Clojure static typing.</p>
  
  <p>I browsed the Java source code for the compiler and there are several places where it checks the value of <code>*warn-on-reflection*</code>, but when I compile the following code, I only get a run-time error:</p>
  
  <pre><code>(defn div-2 [^String s] (/ 2 s))
  </code></pre>
  
  <p>Are there any circumstances where this code should <strong>not</strong> give a compile-time warning (it does not)? How difficult would it be to have the compiler give a warning on the following code:</p>
  
  <pre><code>(defn get-length [^String s] (.length s))
  (defn test-get-length [] (get-length 2.0))
  </code></pre>
  
  <p>Thanks.</p>