Odd undeclared Var warnings are emitted if you enable static-fns and use extend-protocol
To repo with script/noderepljs, modify the last line to specify :static-fns true.
Then run the REPL and define a protocol and extend it to nil
If you instead extend to string, and evaluate (bar "abc") you will see:
FWIW, the same odd WARNINGs are emitted in self-host mode.