mirror of
https://github.com/tc39/test262.git
synced 2025-06-02 13:10:31 +02:00
* Accessing `ta[0]` throws a TypeError. * Fix array indices starting at 0 and property references * Fix classfields templates for properly checking static propnames. * Generate tests * `assert.equal` is not defined * Add missing includes * Generate tests * typo s/Avalue/42/ * fix whitespace * Add missing var for strict mode * Expand generated class fields tests for forbidden computed property name values Ref https://github.com/tc39/test262/pull/1339#issuecomment-342830243 * derived classes have access to private names in base classes, if private names are in scope
23 lines
623 B
Plaintext
23 lines
623 B
Plaintext
// Copyright (C) 2017 Valerie Young. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-class-definitions-static-semantics-early-errors
|
|
path: language/statements/class/fields-string-name-
|
|
name: early error -- PropName of StringLiteral is forbidden value
|
|
negative:
|
|
type: SyntaxError
|
|
phase: early
|
|
info: |
|
|
Static Semantics: PropName
|
|
...
|
|
LiteralPropertyName : StringLiteral
|
|
Return the String value whose code units are the SV of the StringLiteral.
|
|
---*/
|
|
|
|
throw "Test262: This statement should not be evaluated.";
|
|
|
|
class C {
|
|
static '/*{ propname }*/';
|
|
}
|