mirror of https://github.com/tc39/test262.git
Add cases for static methods with super
This commit is contained in:
parent
84ca816378
commit
4b386c0ae5
|
@ -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();
|
||||
}
|
|
@ -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();
|
||||
}
|
|
@ -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();
|
||||
}
|
|
@ -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();
|
||||
}
|
|
@ -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();
|
||||
}
|
|
@ -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();
|
||||
}
|
|
@ -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…
Reference in New Issue