| // Copyright (C) 2020 Rick Waldron. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| /*--- |
| template: forbidden-extensions/bullet-one |
| esid: sec-forbidden-extensions |
| desc: > |
| Forbidden extension, f.arguments |
| info: | |
| 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. |
| |
| flags: [noStrict] |
| ---*/ |
| |
| //- function-has-forbidden-property |
| f.hasOwnProperty("arguments") |
| //- method-has-forbidden-property |
| this.method.hasOwnProperty("arguments") |
| //- error |
| TypeError |