aboutsummaryrefslogtreecommitdiff
path: root/src/test/fixtures/function-scope-bug.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/fixtures/function-scope-bug.jsx')
-rw-r--r--src/test/fixtures/function-scope-bug.jsx28
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>
+ &larr; A child div
+ <Button>Red</Button>
+ </div>
+ </div>
+ );
+};
+
+// This is where it failed.
+var Baz = () => {
+ return (
+ <div prop={1}>
+ Plain text
+ <div>
+ &larr; A child div
+ <Button>Red</Button>
+ </div>
+ </div>
+ );
+};