Fix several function name related issues (#3848)
- For non-computed name srcipt functions only identifier/string literal should be set as name - Implicit class constructor names with non string function name should be ToString-ed JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -285,3 +285,13 @@ assert(Object.getOwnPropertyDescriptor(Array, Symbol.species).get.name === 'get
|
||||
assert(Object.getOwnPropertyDescriptor(String.prototype, Symbol.iterator).value.name === '[Symbol.iterator]');
|
||||
assert(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').get.name === 'get __proto__');
|
||||
assert(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set.name === 'set __proto__');
|
||||
|
||||
let arFunc;
|
||||
let array = [];
|
||||
array['original'] = array;
|
||||
array['original'][arFunc = ()=>{ }]=function(){}
|
||||
assertNameNotExists(array[arFunc]);
|
||||
|
||||
var o = { 0 : class {} };
|
||||
|
||||
assertMethodName(o['0'], '0');
|
||||
|
||||
Reference in New Issue
Block a user