Methods shouldn't have prototype property (#3964)

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
This commit is contained in:
Csaba Osztrogonác
2020-08-05 14:01:58 +02:00
committed by GitHub
parent b82bd76175
commit c76736eadf
8 changed files with 22 additions and 15 deletions
@@ -18,4 +18,8 @@ class MyNonArray extends Array {
static [Symbol.species] () {}
}
(() => MyNonArray)().prototype.slice.call(new MyNonArray((0) === 1))
try {
(() => MyNonArray)().prototype.slice.call(new MyNonArray((0) === 1))
} catch (e) {
assert (e instanceof TypeError);
}