diff options
author | 2021-05-05 19:02:30 -0700 | |
---|---|---|
committer | 2021-05-05 19:02:30 -0700 | |
commit | d975ab19db14b75b1099470cdf984329537a20aa (patch) | |
tree | dfb0845f0e3db99f72ba2217ef0d6b3804592690 /src/test/fixtures/function-scope-bug.jsx | |
parent | 41c9896e11948b91dea278636c226516f7c01f3d (diff) | |
download | bun-d975ab19db14b75b1099470cdf984329537a20aa.tar.gz bun-d975ab19db14b75b1099470cdf984329537a20aa.tar.zst bun-d975ab19db14b75b1099470cdf984329537a20aa.zip |
cool
Former-commit-id: 3708dd44843274f397ae28b2cead39de8f55e6a6
Diffstat (limited to 'src/test/fixtures/function-scope-bug.jsx')
-rw-r--r-- | src/test/fixtures/function-scope-bug.jsx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/fixtures/function-scope-bug.jsx b/src/test/fixtures/function-scope-bug.jsx new file mode 100644 index 000000000..57c783d87 --- /dev/null +++ b/src/test/fixtures/function-scope-bug.jsx @@ -0,0 +1,28 @@ +var Button = () => { + return <div className="button">Button!</div>; +}; + +var Bar = () => { + return ( + <div prop={1}> + Plain text + <div> + ← A child div + <Button>Red</Button> + </div> + </div> + ); +}; + +// This is where it failed. +var Baz = () => { + return ( + <div prop={1}> + Plain text + <div> + ← A child div + <Button>Red</Button> + </div> + </div> + ); +}; |