Emit a warning if you try to dynamically set a goog-define var

Description

You can do this at the REPL:

But, under :advanced this won't work because you can't set goog.define vars in this manner.

Repro:

src/foo/core.cljs

Attempts to do this should result in a warning being emitted.

Note that there are many ways that Google Closure does allow re-defining a goog.define, (see com.google.javascript.jscomp.ProcessDefinesTest in the GCC codebase for examples) with this particular case seemingly falling under testReassignWithExpr. So, a fundamental challenge with this ticket may be in only triggering such a warning when we definitely know Closure will reject the code.

Environment

None

Status

Assignee

Unassigned

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

None

Priority

Major
Configure