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:
@@ -15,7 +15,13 @@
|
||||
|
||||
export var a = 2.5
|
||||
export var b = 4
|
||||
export var c = function(v) { def = v; return "c" }
|
||||
export var c = function(v) {
|
||||
assert(def === 0);
|
||||
a = v;
|
||||
return "c"
|
||||
}
|
||||
|
||||
var def = 8.5
|
||||
/* Nothing is tracked, only the result value is exported. */
|
||||
export default def
|
||||
def = 0
|
||||
|
||||
Reference in New Issue
Block a user