Export assignment expression must not track variables (#4660)

Only export the result of the assignment expression. This value cannot be changed later.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-04-21 08:56:50 +02:00
committed by GitHub
parent dead11cdd0
commit b4bea25f13
7 changed files with 38 additions and 13 deletions
@@ -21,6 +21,7 @@ import foo6 from "./module-export-default-6.mjs"
import foo7 from "./module-export-default-7.mjs"
import foo8, { counter as bar8 } from "./module-export-default-8.mjs"
import foo9, { counter as bar9 } from "./module-export-default-9.mjs"
import foo10, { g as bar10 } from "./module-export-default-10.mjs"
let async_queue_expected = ["foo2", "foo3", "foo6", "foo7"];
let async_queue = [];
@@ -66,6 +67,13 @@ let async_queue = [];
assert(bar9 === 9.1);
})();
(function() {
var o = {}
assert(foo10() === 1.5);
assert(bar10(o) === "X");
assert(foo10 === o);
})();
Array.prototype.assertArrayEqual = function(expected) {
assert(this.length === expected.length);
print(this);