mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
Add cases for static methods with super
This commit is contained in:
parent
84ca816378
commit
4b386c0ae5
21
src/class-elements/grammar-static-async-gen-meth-super.case
Normal file
21
src/class-elements/grammar-static-async-gen-meth-super.case
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// 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 contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
features: [async-iteration]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static async * method() {
|
||||||
|
super();
|
||||||
|
}
|
21
src/class-elements/grammar-static-async-meth-super.case
Normal file
21
src/class-elements/grammar-static-async-meth-super.case
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// 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 contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
features: [async-functions]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static async method() {
|
||||||
|
super();
|
||||||
|
}
|
21
src/class-elements/grammar-static-gen-meth-super.case
Normal file
21
src/class-elements/grammar-static-gen-meth-super.case
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// 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 contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
features: [generators]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static * method() {
|
||||||
|
super();
|
||||||
|
}
|
20
src/class-elements/grammar-static-get-meth-super.case
Normal file
20
src/class-elements/grammar-static-get-meth-super.case
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// 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 contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static get method() {
|
||||||
|
super();
|
||||||
|
}
|
20
src/class-elements/grammar-static-meth-super.case
Normal file
20
src/class-elements/grammar-static-meth-super.case
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// 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 contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static method() {
|
||||||
|
super();
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
// 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 cannot contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
features: [async-iteration, class-static-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static async * #method() {
|
||||||
|
super();
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
// 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 cannot contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
features: [async-functions, class-static-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static async #method() {
|
||||||
|
super();
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
// 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 cannot contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
features: [generators, class-static-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static * #method() {
|
||||||
|
super();
|
||||||
|
}
|
21
src/class-elements/grammar-static-private-meth-super.case
Normal file
21
src/class-elements/grammar-static-private-meth-super.case
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// 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 cannot contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
features: [class-static-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static #method() {
|
||||||
|
super();
|
||||||
|
}
|
20
src/class-elements/grammar-static-set-meth-super.case
Normal file
20
src/class-elements/grammar-static-set-meth-super.case
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// 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 contain direct super
|
||||||
|
info: |
|
||||||
|
Class Definitions / Static Semantics: Early Errors
|
||||||
|
|
||||||
|
ClassElement : static MethodDefinition
|
||||||
|
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||||
|
template: syntax/invalid
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Uses a valid heritage to avoid false positives
|
||||||
|
//- heritage
|
||||||
|
extends Function
|
||||||
|
//- elements
|
||||||
|
static set method(_) {
|
||||||
|
super();
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user