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

add generation cases for special methods with propname constructor

parent 2720e08d
No related branches found
No related tags found
No related merge requests found
Showing
with 80 additions and 66 deletions
......@@ -22,8 +22,6 @@ info: |
# IdentifierName
template: syntax/invalid
negative:
features: [class-fields-private]
---*/
......
// 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() {}
// 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() {}
// 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() {}
// 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() {}
// 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() {}
// 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() {}
}
// 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() {}
}
// 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(_) {}
}
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