def in a letfn function emits unwanted warning
File src/my/app.cljs :
Compiler output : WARNING: b at line 2 is being replaced at line 2 src/my/app.cljs
In the parse multimethod for letfn*, there is an initial pass and
then a second pass. analyze is called twice on the passed in form and
when the form contains a 'def the associated parse multimethod will
...so that env/*compiler* already has sym during the second pass.
That's one of the 5 conditions for sending out the warning for
(not *allowing-redef*) is another one of those conditions and this
change adding (allowing-redef ...) to just the second analyze pass
sets it to true temporarily so that this error message will not send
when a def is in a letfn.
There are no tests for this because, this only happens when compiling a
file because two of the other preconditions to send the warning are
*file-defs* and (get @*file-defs* sym) and *file-defs* only gets
initlaized in cljs.compiler/compile-file
Can repro on current master.