mirror of https://github.com/tc39/test262.git
add generation cases for special methods with propname constructor
This commit is contained in:
parent
2720e08dae
commit
46e03c3875
|
@ -22,8 +22,6 @@ info: |
|
|||
# IdentifierName
|
||||
|
||||
template: syntax/invalid
|
||||
negative:
|
||||
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
|
|
|
@ -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: Async Generator Methods cannot be named "constructor"
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
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: Async Methods cannot be named "constructor"
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
async constructor() {}
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (C) 2018 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Generator Methods cannot be named "constructor"
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
* constructor() {}
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (C) 2018 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Generator Methods cannot be named "constructor"
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
get constructor() {}
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (C) 2018 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Generator Methods cannot be named "constructor"
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
set constructor() {}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 14.5.1
|
||||
description: >
|
||||
ClassElement : MethodDefinition
|
||||
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
|
||||
(GeneratorMethod)
|
||||
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
class A {
|
||||
* constructor() {}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 14.5.1
|
||||
description: >
|
||||
ClassElement : MethodDefinition
|
||||
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
|
||||
(get)
|
||||
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
class A {
|
||||
get constructor() {}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 14.5.1
|
||||
description: >
|
||||
ClassElement : MethodDefinition
|
||||
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
|
||||
(set)
|
||||
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
class A {
|
||||
set constructor(_) {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue