diff --git a/Units/parser-javascript.r/js-destructural-binding-todo.b/args.ctags b/Units/parser-javascript.r/js-destructural-binding-todo.b/args.ctags new file mode 100644 index 0000000000..5ee5f79f70 --- /dev/null +++ b/Units/parser-javascript.r/js-destructural-binding-todo.b/args.ctags @@ -0,0 +1 @@ +--sort=no diff --git a/Units/parser-javascript.r/js-destructural-binding-todo.b/expected.tags b/Units/parser-javascript.r/js-destructural-binding-todo.b/expected.tags new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Units/parser-javascript.r/js-destructural-binding-todo.b/input-1.js b/Units/parser-javascript.r/js-destructural-binding-todo.b/input-1.js new file mode 100644 index 0000000000..5f2714efce --- /dev/null +++ b/Units/parser-javascript.r/js-destructural-binding-todo.b/input-1.js @@ -0,0 +1,3 @@ +// See #3435. +// f should be tagged with function kind. +let [f] = [function() {}]; diff --git a/Units/parser-javascript.r/js-destructural-binding-todo.b/input.js b/Units/parser-javascript.r/js-destructural-binding-todo.b/input.js new file mode 100644 index 0000000000..51b38a2ef5 --- /dev/null +++ b/Units/parser-javascript.r/js-destructural-binding-todo.b/input.js @@ -0,0 +1,9 @@ +// See #3435. +// If an object literal is specified as a default value in object restructuring, +// the parser may fail to extract the variable (or constant): +var{ c = {a: 1} } = { c: undefined }; +var{ d = {a: 1} } = {d: 3}; +var a = 1 +var [x = {a: 2}, y] = [, 4]; +var [x = [a, 2], z] = [, 4]; +var { 'alpha': q = {'x': 9} } = {'alpha': 3};