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);