Fix strict mode in an object initializer's getters / setters definition.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
committed by
Evgeny Gavrin
parent
4f58104981
commit
7ccec19c26
@@ -24,3 +24,16 @@ function c() {
|
||||
assert (b.let + b.enum === 25)
|
||||
}
|
||||
c();
|
||||
|
||||
function d () {
|
||||
"use strict";
|
||||
|
||||
try {
|
||||
/* 'let' is a FutureReservedWord in strict mode code */
|
||||
eval ('var a = { get prop () { let = 1; } }');
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof SyntaxError);
|
||||
}
|
||||
}
|
||||
d ();
|
||||
|
||||
Reference in New Issue
Block a user