From b3f32f9cbe602c339e2053f1ac6285b6b3fc537e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 21 Feb 2017 22:56:03 +0100 Subject: [PATCH] test: add regression test for V8 parse error Refs: https://github.com/nodejs/node/issues/11480 PR-URL: https://github.com/nodejs/node/pull/11483 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Myles Borins --- test/parallel/test-regress-GH-11480.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/parallel/test-regress-GH-11480.js diff --git a/test/parallel/test-regress-GH-11480.js b/test/parallel/test-regress-GH-11480.js new file mode 100644 index 00000000000000..bd536e5e7b25eb --- /dev/null +++ b/test/parallel/test-regress-GH-11480.js @@ -0,0 +1,14 @@ +'use strict'; +require('../common'); +const assert = require('assert'); + +// https://github.com/nodejs/node/issues/11480 +// This code should not throw a SyntaxError. + +const a = 1; +const b = 1; +let c; + +((a + 1), {c} = b); + +assert.strictEqual(c, undefined);