Problem
Inside a proxy method, binding this to a type-hinted local crashes the analyzer. For example:
(proxy [System.IO.StringWriter] []
(Flush [] (let [^System.IO.StringWriter this this]
(proxy-super Flush))))
fails with Could not invoke zero arity member 'BaseType' ...: the compiler calls .BaseType on the AST binding node instead of a Type. This is the ClojureCLR proxy-super idiom, and valid Clojure that ClojureCLR compiles.
Suggestion
In magic/analyzer/types.clj (ast-type-impl :local) and the proxy rewrite in magic/analyzer/typed_passes.clj (around lines 360-400), treat this as :proxy-this only when the resolved binding has :local :proxy-this; let a shadowing :local :let binding fall through to normal tag resolution. Gate any change on the magic.test.proxy and magic.test.reify suites.
Problem
Inside a proxy method, binding
thisto a type-hinted local crashes the analyzer. For example:fails with
Could not invoke zero arity member 'BaseType' ...: the compiler calls.BaseTypeon the AST binding node instead of a Type. This is the ClojureCLR proxy-super idiom, and valid Clojure that ClojureCLR compiles.Suggestion
In
magic/analyzer/types.clj(ast-type-impl :local) and the proxy rewrite inmagic/analyzer/typed_passes.clj(around lines 360-400), treatthisas:proxy-thisonly when the resolved binding has:local :proxy-this; let a shadowing:local :letbinding fall through to normal tag resolution. Gate any change on themagic.test.proxyandmagic.test.reifysuites.