Skip to content
Snippets Groups Projects
Commit ea4c8fc9 authored by Valerie R Young's avatar Valerie R Young
Browse files

classfields: add tests for forbidden privatenames

parent 458e33af
No related branches found
No related tags found
No related merge requests found
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Private class fields early error with StringValue "#constructor"
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
negative:
phase: early
type: SyntaxError
info: |
ClassElementName : PrivateName;
It is a Syntax Error if StringValue of PrivateName is "#constructor".
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#constructor;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Private class fields early error with StringValue "#constructor"
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
negative:
phase: early
type: SyntaxError
info: |
ClassElementName : PrivateName;
It is a Syntax Error if StringValue of PrivateName is "#constructor".
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#constructor;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment