1 // |reftest| error:SyntaxError
2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-scripts-static-semantics-early-errors
7 description: An ArrowFunction in global code may not contain SuperProperty
9 - It is a Syntax Error if StatementList Contains super unless the source code
10 containing super is eval code that is being processed by a direct eval that
11 is contained in function code that is not the function code of an
14 14.2.3 Static Semantics: Contains
16 With parameter symbol.
18 ArrowFunction : ArrowParameters => ConciseBody
20 1. If symbol is not one of NewTarget, SuperProperty, SuperCall, super or
22 2. If ArrowParameters Contains symbol is true, return true.
23 3. Return ConciseBody Contains symbol.
25 NOTE Normally, Contains does not look inside most function forms. However,
26 Contains is used to detect new.target, this, and super usage within an
28 features: [super, arrow-function]