mirror of https://github.com/tc39/test262.git
Generate tests
This commit is contained in:
parent
6a428b4a40
commit
fd92897147
|
@ -0,0 +1,25 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/arrow-function.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (arrow function expression)
|
||||
esid: sec-arrow-function-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ArrowFunction : ArrowParameters => ConciseBody
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = () => {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'arrow function body not evaluated');
|
|
@ -0,0 +1,25 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/arrow-function.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (arrow function expression)
|
||||
esid: sec-arrow-function-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ArrowFunction : ArrowParameters => ConciseBody
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = () => {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'arrow function body not evaluated');
|
|
@ -0,0 +1,30 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/arrow-function.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (arrow function expression)
|
||||
esid: sec-arrow-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ArrowFunction : ArrowParameters => ConciseBody
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = () => {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'arrow function body not evaluated');
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-arrow-function.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async arrow function expression)
|
||||
esid: sec-async-arrow-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncArrowFunction :
|
||||
...
|
||||
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||
|
||||
AsyncConciseBody :
|
||||
{ AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async () => {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-arrow-function.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async arrow function expression)
|
||||
esid: sec-async-arrow-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncArrowFunction :
|
||||
...
|
||||
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||
|
||||
AsyncConciseBody :
|
||||
{ AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async () => {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,42 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-arrow-function.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async arrow function expression)
|
||||
esid: sec-async-arrow-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncArrowFunction :
|
||||
...
|
||||
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||
|
||||
AsyncConciseBody :
|
||||
{ AsyncFunctionBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async () => {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-func-expr-named.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async function named expression)
|
||||
esid: sec-async-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionExpression :
|
||||
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f = async function f() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-func-expr-named.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async function named expression)
|
||||
esid: sec-async-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionExpression :
|
||||
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f = async function f() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-func-expr-named.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async function named expression)
|
||||
esid: sec-async-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionExpression :
|
||||
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f = async function f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-func-expr-nameless.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async function nameless expression)
|
||||
esid: sec-async-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionExpression :
|
||||
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f = async function() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-func-expr-nameless.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async function nameless expression)
|
||||
esid: sec-async-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionExpression :
|
||||
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f = async function() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-func-expr-nameless.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async function nameless expression)
|
||||
esid: sec-async-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionExpression :
|
||||
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f = async function() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-gen-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async generator function expression)
|
||||
esid: sec-asyncgenerator-definitions-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
|
||||
AsyncGeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-gen-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async generator function expression)
|
||||
esid: sec-asyncgenerator-definitions-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
|
||||
AsyncGeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-gen-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async generator function expression)
|
||||
esid: sec-asyncgenerator-definitions-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
|
||||
AsyncGeneratorBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-gen-named-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async generator named function expression)
|
||||
esid: sec-asyncgenerator-definitions-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
|
||||
( FormalParameters ) { AsyncGeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* g() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-gen-named-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async generator named function expression)
|
||||
esid: sec-asyncgenerator-definitions-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
|
||||
( FormalParameters ) { AsyncGeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* g() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-gen-named-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async generator named function expression)
|
||||
esid: sec-asyncgenerator-definitions-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
|
||||
( FormalParameters ) { AsyncGeneratorBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* g() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-async-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (static class expression async generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-async-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression async generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-expr-async-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression async generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (class expression async generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.prototype.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression async generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.prototype.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-expr-async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression async generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.prototype.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,34 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-async-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (static class expression async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
|
||||
var C = class {
|
||||
static async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,34 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-async-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
|
||||
var C = class {
|
||||
static async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,39 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-expr-async-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
|
||||
var C = class {
|
||||
static async method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (class expression async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.prototype.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.prototype.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-expr-async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
C.prototype.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,28 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (static class expression generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,28 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-expr-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,28 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
*method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,28 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
*method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-expr-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
*method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (static class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,31 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-expr-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-expr-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,31 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-expr-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,25 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/func-expr-strict.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (function expression)
|
||||
esid: sec-function-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
FunctionExpression : function ( FormalParameters ) { FunctionBody }
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = function() {
|
||||
"use strict";
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'function body not evaluated');
|
|
@ -0,0 +1,25 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/func-expr-strict.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (function expression)
|
||||
esid: sec-function-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
FunctionExpression : function ( FormalParameters ) { FunctionBody }
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = function() {
|
||||
"use strict";
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'function body not evaluated');
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (function expression)
|
||||
esid: sec-definitions-runtime-semantics-evaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
FunctionExpression : function ( FormalParameters ) { FunctionBody }
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = function() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,27 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/gen-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (generator function expression)
|
||||
esid: sec-generator-function-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorExpression : function * ( FormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = function*() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'generator function body not evaluated');
|
|
@ -0,0 +1,27 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/gen-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (generator function expression)
|
||||
esid: sec-generator-function-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorExpression : function * ( FormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = function*() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'generator function body not evaluated');
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/gen-func-expr.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (generator function expression)
|
||||
esid: sec-generator-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorExpression : function * ( FormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = function*() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'generator function body not evaluated');
|
|
@ -0,0 +1,34 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async generator method)
|
||||
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorMethod :
|
||||
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
|
||||
{ AsyncGeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
obj.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,34 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async generator method)
|
||||
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorMethod :
|
||||
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
|
||||
{ AsyncGeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
obj.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,39 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async generator method)
|
||||
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorMethod :
|
||||
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
|
||||
{ AsyncGeneratorBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
async *method() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
obj.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,35 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async method)
|
||||
esid: sec-async-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncMethod :
|
||||
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
|
||||
var obj = {
|
||||
async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
obj.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,35 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async method)
|
||||
esid: sec-async-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncMethod :
|
||||
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
|
||||
var obj = {
|
||||
async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
obj.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,40 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async method)
|
||||
esid: sec-async-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncMethod :
|
||||
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
|
||||
var obj = {
|
||||
async method() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
obj.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (generator method)
|
||||
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorMethod :
|
||||
* PropertyName ( StrictFormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
*method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
obj.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'generator method body not evaluated');
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (generator method)
|
||||
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorMethod :
|
||||
* PropertyName ( StrictFormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
*method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
obj.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'generator method body not evaluated');
|
|
@ -0,0 +1,34 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (generator method)
|
||||
esid: sec-generator-definitions-runtime-semantics-propertydefinitionevaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorMethod :
|
||||
* PropertyName ( StrictFormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
*method() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
obj.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'generator method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (method)
|
||||
esid: sec-runtime-semantics-definemethod
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
obj.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (method)
|
||||
esid: sec-runtime-semantics-definemethod
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
obj.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,31 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (method)
|
||||
esid: sec-runtime-semantics-definemethod
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
method() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
obj.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async function declaration)
|
||||
esid: sec-async-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionDeclaration :
|
||||
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
async function f() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async function declaration)
|
||||
esid: sec-async-function-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionDeclaration :
|
||||
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
async function f() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async function declaration)
|
||||
esid: sec-async-definitions
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncFunctionDeclaration :
|
||||
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
async function f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-gen-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (async generator function declaration)
|
||||
esid: sec-asyncgenerator-definitions-instantiatefunctionobject
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorDeclaration : async [no LineTerminator here] function * BindingIdentifier
|
||||
( FormalParameters ) { AsyncGeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
async function* f() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/async-gen-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async generator function declaration)
|
||||
esid: sec-asyncgenerator-definitions-instantiatefunctionobject
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorDeclaration : async [no LineTerminator here] function * BindingIdentifier
|
||||
( FormalParameters ) { AsyncGeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
async function* f() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/async-gen-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (async generator function declaration)
|
||||
esid: sec-asyncgenerator-definitions-instantiatefunctionobject
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
AsyncGeneratorDeclaration : async [no LineTerminator here] function * BindingIdentifier
|
||||
( FormalParameters ) { AsyncGeneratorBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
async function* f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
f().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-async-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (static class expression generator method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-async-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression generator method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-decl-async-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression generator method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.prototype.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.prototype.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,37 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-decl-async-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.prototype.method().next()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-async-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (static class declaration async method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-async-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class declaration async method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-decl-async-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class declaration async method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (class declaration async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.prototype.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class declaration async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.prototype.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-decl-async-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class declaration async method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-functions]
|
||||
flags: [generated, noStrict, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.prototype.method()
|
||||
.then(_ => {
|
||||
throw new Test262Error('function should not be resolved');
|
||||
}, error => assert.sameValue(error.constructor, TypeError))
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||
}, $DONE)
|
||||
.then($DONE, $DONE);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (static class expression generator method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method().next();
|
||||
});
|
||||
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression generator method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method().next();
|
||||
});
|
||||
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,34 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-decl-gen-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression generator method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method().next();
|
||||
});
|
||||
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,28 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
*method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,28 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
*method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-decl-gen-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
*method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method().next();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (static class expression method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,31 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-decl-meth-static.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (static class expression method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (class expression method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/cls-decl-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,31 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/cls-decl-meth.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (class expression method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
C.prototype.method();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,25 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/func-decl-strict.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (function declaration)
|
||||
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
FunctionDeclaration :
|
||||
function BindingIdentifier ( FormalParameters ) { FunctionBody }
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
function f() {
|
||||
"use strict";
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'function body not evaluated');
|
|
@ -0,0 +1,25 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/func-decl-strict.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (function declaration)
|
||||
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
FunctionDeclaration :
|
||||
function BindingIdentifier ( FormalParameters ) { FunctionBody }
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
function f() {
|
||||
"use strict";
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'function body not evaluated');
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (function declaration)
|
||||
esid: sec-definitions-runtime-semantics-instantiatefunctionobject
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
FunctionDeclaration :
|
||||
function BindingIdentifier ( FormalParameters ) { FunctionBody }
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
function f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
||||
});
|
||||
assert.sameValue(callCount, 0, 'method body not evaluated');
|
|
@ -0,0 +1,27 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/gen-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.arguments (generator function declaration)
|
||||
esid: sec-generator-function-definitions-runtime-semantics-instantiatefunctionobject
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
function* f() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f().next();
|
||||
});
|
||||
|
||||
assert.sameValue(callCount, 0, 'generator function body not evaluated');
|
|
@ -0,0 +1,27 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-one/gen-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (generator function declaration)
|
||||
esid: sec-generator-function-definitions-runtime-semantics-instantiatefunctionobject
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
|
||||
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
function* f() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f().next();
|
||||
});
|
||||
|
||||
assert.sameValue(callCount, 0, 'generator function body not evaluated');
|
|
@ -0,0 +1,32 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
|
||||
// - src/function-forms/forbidden-extensions/bullet-two/gen-func-decl.template
|
||||
/*---
|
||||
description: Forbidden extension, o.caller (generator function declaration)
|
||||
esid: sec-generator-definitions-runtime-semantics-instantiatefunctionobject
|
||||
features: [generators]
|
||||
flags: [generated, noStrict]
|
||||
info: |
|
||||
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
|
||||
|
||||
|
||||
If an implementation extends any function object with an own property named "caller" the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
|
||||
|
||||
---*/
|
||||
function inner() {
|
||||
// This property is forbidden from having a value that is strict function object
|
||||
return inner.caller;
|
||||
}
|
||||
|
||||
var callCount = 0;
|
||||
function* f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
f().next();
|
||||
});
|
||||
|
||||
assert.sameValue(callCount, 0, 'generator function body not evaluated');
|
Loading…
Reference in New Issue