diff options
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> + ); +}; |