Revision control

Copy as Markdown

// 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-computed-name-
name: no early error -- PropName of ComputedPropertyName not forbidden value
info: |
Static Semantics: PropName
...
ComputedPropertyName : [ AssignmentExpression ]
Return empty.
---*/
var x = "/*{ propname }*/";
class C {
[x];
}
var c = new C();
assert.sameValue(c.hasOwnProperty("/*{ propname }*/"), true);
assert.sameValue(C.hasOwnProperty("/*{ propname }*/"), false);