mirror of https://github.com/tc39/test262.git
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() {}
|
|
@ -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() {}
|
|
@ -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() {}
|
|
@ -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() {}
|
|
@ -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() {}
|
|
@ -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…
Reference in New Issue