diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-03-22 20:59:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-23 04:59:43 +0800 |
commit | f9055df44d86c8537afc34f00bd255792f80422f (patch) | |
tree | dcc6102ab6485002fb7255d45d2ae014c7a737f6 /test/ufuzz | |
parent | 51bdb7281bb555f0cc56ca15560a8ab514b0a632 (diff) | |
download | tracifyjs-f9055df44d86c8537afc34f00bd255792f80422f.tar.gz tracifyjs-f9055df44d86c8537afc34f00bd255792f80422f.zip |
support logical assignment operators (#4813)
Diffstat (limited to 'test/ufuzz')
-rw-r--r-- | test/ufuzz/index.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index d91fe040..e2bcdf2c 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -149,6 +149,7 @@ var SUPPORT = function(matrix) { for_of: "for (var a of []);", generator: "function* f(){}", let: "let a;", + logical_assignment: "[].p ??= 0;", new_target: "function f() { new.target; }", nullish: "0 ?? 0", rest: "var [...a] = [];", @@ -262,10 +263,13 @@ ASSIGNMENTS = ASSIGNMENTS.concat([ ">>=", ">>>=", ]); -if (SUPPORT.exponentiation) { - ASSIGNMENTS = ASSIGNMENTS.concat(ASSIGNMENTS); - ASSIGNMENTS.push("**="); -} +ASSIGNMENTS = ASSIGNMENTS.concat(ASSIGNMENTS); +if (SUPPORT.exponentiation) ASSIGNMENTS.push("**="); +if (SUPPORT.logical_assignment) ASSIGNMENTS = ASSIGNMENTS.concat([ + "&&=", + "||=", + "??=", +]); var UNARY_SAFE = [ "+", |