如何键入此反射警告?

Tim*_*ley 7 reflection clojure

(set! *warn-on-reflection* true)
(proxy [javax.swing.JPanel] []
  (paintComponent [#^java.awt.Graphics g]
    (proxy-super paintComponent g)
    (.fillRect g 100 100 10 10)))
Run Code Online (Sandbox Code Playgroud)

"反射警告,调用paintComponent无法解决"

Yao*_*ocl 5

因为 proxy-super 使用隐式this.

(let [^javax.swing.JPanel this this]
  (proxy-super paintComponent g))
Run Code Online (Sandbox Code Playgroud)