mirror of https://github.com/tc39/test262.git
Private names disallowed for constructor
This commit is contained in:
parent
94a40cb474
commit
75a579a0d4
|
@ -0,0 +1,16 @@
|
|||
// 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
|
|
@ -0,0 +1,16 @@
|
|||
// 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() {}
|
|
@ -0,0 +1,16 @@
|
|||
// 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() {}
|
|
@ -0,0 +1,16 @@
|
|||
// 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() {}
|
|
@ -0,0 +1,16 @@
|
|||
// 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() {}
|
|
@ -0,0 +1,16 @@
|
|||
// 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
|
Loading…
Reference in New Issue