[compiler] Add tests for incorrect global mutation detection
If a function expression that mutates a global is passed as a prop, we don't throw an error as we assume it's not called in render. But if this function expression is captured in an object and passed down as prop, we throw an error. ghstack-source-id: 74cacee09f565550007b2e01fa8877ad64ccfbe9 Pull Request resolved: https://github.com/facebook/react/pull/30456
S
Sathya Gunsasekaran committed
c5fa460784c41a2e09e9ed1c4468f4f089e2a78b
Parent: e8df0cf