add cases for static method names named prototype

This commit is contained in:
Leo Balter 2018-09-05 17:38:05 -04:00 committed by Rick Waldron
parent ef591384d8
commit 20217a7eeb
13 changed files with 157 additions and 61 deletions

View File

@ -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 Methods cannot be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/invalid
features: [async-iteration]
---*/
//- elements
static async * prototype() {}

View File

@ -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 Methods cannot be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/invalid
features: [async-functions]
---*/
//- elements
static async prototype() {}

View File

@ -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 Methods cannot be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/invalid
features: [generators]
---*/
//- elements
static * prototype() {}

View File

@ -0,0 +1,15 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Static Accessor get Methods cannot be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/invalid
---*/
//- elements
static get prototype() {}

View File

@ -0,0 +1,15 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Static Methods cannot be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/invalid
---*/
//- elements
static prototype() {}

View File

@ -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 can be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/valid
features: [async-iteration, class-static-methods-private]
---*/
//- elements
static async * #prototype() {}

View File

@ -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 can be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/valid
features: [async-functions, class-static-methods-private]
---*/
//- elements
static async #prototype() {}

View File

@ -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 can be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/valid
features: [generators, class-static-methods-private]
---*/
//- elements
static * #prototype() {}

View File

@ -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 can be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/valid
features: [class-static-methods-private]
---*/
//- elements
static #prototype() {}

View File

@ -0,0 +1,15 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Static Accessor set Methods cannot be named prototype
info: |
Class Definitions / Static Semantics: Early Errors
ClassElement : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype"
template: syntax/invalid
---*/
//- elements
static set prototype() {}

View File

@ -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 : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype".
(get)
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
class A {
static get prototype() {}
}

View File

@ -1,19 +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 : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype".
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
class A {
static prototype() {}
}

View File

@ -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 : static MethodDefinition
It is a Syntax Error if PropName of MethodDefinition is "prototype".
(set)
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
class A {
static set prototype() {}
}