Skip to content

Commit e71fc70

Browse files
targosMylesBorins
authored andcommitted
test: add regression test for V8 parse error
Refs: #11480 PR-URL: #11483 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent d0e934f commit e71fc70

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: test/parallel/test-regress-GH-11480.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
require('../common');
3+
const assert = require('assert');
4+
5+
// https://github.com/nodejs/node/issues/11480
6+
// This code should not throw a SyntaxError.
7+
8+
const a = 1;
9+
const b = 1;
10+
let c;
11+
12+
((a + 1), {c} = b);
13+
14+
assert.strictEqual(c, undefined);

0 commit comments

Comments
 (0)