How do I typehint away this reflection warning?
(set! *warn-on-reflection* true)
(proxy [javax.swing.JPanel] []
(paintComponent [#^java.awt.Graphics g]
(proxy-super paintComponent g)
(.fillRect g 100 100 10 10)))
“反射警告,调用paintComponent无法解析”
因为代理超级使用隐含this
。
(let [^javax.swing.JPanel this this]
(proxy-super paintComponent g))
It looks like the warning is for the line
(proxy-super paintComponent g)
Does the parent class of javax.swing.JPanel have a paintComponent method?
Removing that line works for me.
链接地址: http://www.djcxy.com/p/43508.html下一篇: 我如何输入提示反射警告?