mirror of https://github.com/tc39/test262.git
Add cases for non-ctor methods containing direct super
This commit is contained in:
parent
585dac6d46
commit
92c83dfbd4
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Async Generator Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
async * method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Async Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
async method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Generator Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
* method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Accessor get Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
get method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Private Async Generators Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [async-iteration, class-methods-private]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
async * #method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Private Async Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [async-functions, class-methods-private]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
async #method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Private Generators Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [generators, class-methods-private]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
* #method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Private Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
features: [class-methods-private]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
#method() {
|
||||
super();
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Accessor set Methods cannot contain direct super
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
template: syntax/invalid
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
set method(_) {
|
||||
super();
|
||||
}
|
|
@ -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 : MethodDefinition
|
||||
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
class A {
|
||||
method() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +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 : MethodDefinition
|
||||
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
|
||||
(GeneratorMethod)
|
||||
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
class A {
|
||||
* method() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +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 : MethodDefinition
|
||||
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
|
||||
(get)
|
||||
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
class A {
|
||||
get method() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +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 : MethodDefinition
|
||||
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
|
||||
(set)
|
||||
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
class A {
|
||||
set method(_) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue