mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
363 B
23 lines
363 B
|
|
// indirect eval -> this is bound to the global object, E5 Section 10.4.2, step 1.a.
|
|
var g = (function () { var e = eval; return e('this'); } )();
|
|
|
|
/*===
|
|
TypeError
|
|
TypeError
|
|
===*/
|
|
|
|
try {
|
|
// not constructable -> TypeError
|
|
new g();
|
|
} catch (e) {
|
|
print(e.name);
|
|
}
|
|
|
|
try {
|
|
// not callable -> TypeError
|
|
new g();
|
|
} catch (e) {
|
|
print(e.name);
|
|
}
|
|
|
|
|