Skip to content

Commit 2927d3a

Browse files
author
Christoph
committed
test: adds a snapshot test to demonstrate the issue
Arrays of objects create definitions for all object keys contained
1 parent f720536 commit 2927d3a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

snapshots/input/pure-js/src/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ function var_function_scope() {
4747
}
4848
print_fib(k)
4949
}
50+
51+
function array_of_objects() {
52+
[{ element: 0 }, { element: 1}]
53+
}

snapshots/output/pure-js/src/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,10 @@ function var_function_scope() {
9797
// ^ reference local 17
9898
}
9999

100+
function array_of_objects() {
101+
// ^^^^^^^^^^^^^^^^ definition pure-js 1.0.0 src/`main.js`/array_of_objects().
102+
[{ element: 0 }, { element: 1}]
103+
// ^^^^^^^ definition pure-js 1.0.0 src/`main.js`/element0:
104+
// ^^^^^^^ definition pure-js 1.0.0 src/`main.js`/element1:
105+
}
106+

0 commit comments

Comments
 (0)