Skip to content
Snippets Groups Projects
Commit 75a579a0 authored by Leo Balter's avatar Leo Balter Committed by Rick Waldron
Browse files

Private names disallowed for constructor

parent 94a40cb4
No related branches found
No related tags found
No related merge requests found
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Private Fields cannot be named constructor
info: |
Class Definitions / Static Semantics: Early Errors
ClassElementName : PrivateName ;
It is a Syntax Error if StringValue of PrivateName is "#constructor"
template: syntax/invalid
features: [class-fields-private]
---*/
//- elements
#constructor
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Static Async Generator Private Methods cannot be named constructor
info: |
Class Definitions / Static Semantics: Early Errors
ClassElementName : PrivateName ;
It is a Syntax Error if StringValue of PrivateName is "#constructor"
template: syntax/invalid
features: [async-iteration, class-static-methods-private]
---*/
//- elements
static async * #constructor() {}
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Static Async Private Methods cannot be named constructor
info: |
Class Definitions / Static Semantics: Early Errors
ClassElementName : PrivateName ;
It is a Syntax Error if StringValue of PrivateName is "#constructor"
template: syntax/invalid
features: [async-functions, class-static-methods-private]
---*/
//- elements
static async #constructor() {}
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Static Generator Private Methods cannot be named constructor
info: |
Class Definitions / Static Semantics: Early Errors
ClassElementName : PrivateName ;
It is a Syntax Error if StringValue of PrivateName is "#constructor"
template: syntax/invalid
features: [generators, class-static-methods-private]
---*/
//- elements
static * #constructor() {}
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Static Private Methods cannot be named constructor
info: |
Class Definitions / Static Semantics: Early Errors
ClassElementName : PrivateName ;
It is a Syntax Error if StringValue of PrivateName is "#constructor"
template: syntax/invalid
features: [class-static-methods-private]
---*/
//- elements
static #constructor() {}
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Static Private Fields cannot be named constructor
info: |
Class Definitions / Static Semantics: Early Errors
ClassElementName : PrivateName ;
It is a Syntax Error if StringValue of PrivateName is "#constructor"
template: syntax/invalid
features: [class-static-fields-private]
---*/
//- elements
static #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