mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
add cases for static method names named prototype
This commit is contained in:
parent
ef591384d8
commit
20217a7eeb
@ -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() {}
|
16
src/class-elements/grammar-static-async-meth-prototype.case
Normal file
16
src/class-elements/grammar-static-async-meth-prototype.case
Normal 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() {}
|
16
src/class-elements/grammar-static-gen-meth-prototype.case
Normal file
16
src/class-elements/grammar-static-gen-meth-prototype.case
Normal 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() {}
|
15
src/class-elements/grammar-static-get-meth-prototype.case
Normal file
15
src/class-elements/grammar-static-get-meth-prototype.case
Normal 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() {}
|
15
src/class-elements/grammar-static-meth-prototype.case
Normal file
15
src/class-elements/grammar-static-meth-prototype.case
Normal 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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
15
src/class-elements/grammar-static-set-meth-prototype.case
Normal file
15
src/class-elements/grammar-static-set-meth-prototype.case
Normal 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() {}
|
@ -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() {}
|
|
||||||
}
|
|
||||||
|
|
@ -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() {}
|
|
||||||
}
|
|
||||||
|
|
@ -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() {}
|
|
||||||
}
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user