mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 22:15:24 +02:00
Merge pull request #200 from bocoup/198
computed-property-names: corrections. Fixes gh-198
This commit is contained in:
commit
2df6c4f219
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
es6id: 14.5.3
|
es6id: 14.5.3
|
||||||
description: >
|
description: >
|
||||||
computed property getter names cannot be "constructor"
|
computed property getter names can be called "constructor"
|
||||||
negative: SyntaxError
|
negative: SyntaxError
|
||||||
---*/
|
---*/
|
||||||
class C4 {
|
class C4 {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
es6id: 14.5.3
|
es6id: 14.5.3
|
||||||
description: >
|
description: >
|
||||||
computed property setter names cannot be "constructor"
|
computed property setter names can be called "constructor"
|
||||||
negative: SyntaxError
|
negative: SyntaxError
|
||||||
---*/
|
---*/
|
||||||
class C4 {
|
class C4 {
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
es6id: 12.2.5
|
es6id: 12.2.5
|
||||||
description: >
|
description: >
|
||||||
computed property names can be "constructor", but duplicates are not allowed, 1
|
computed property names can be "constructor"
|
||||||
negative: SyntaxError
|
|
||||||
---*/
|
---*/
|
||||||
class C {
|
class C {
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
es6id: 12.2.5
|
es6id: 12.2.5
|
||||||
description: >
|
description: >
|
||||||
computed property names can be "constructor", but duplicates are not allowed, 2
|
computed property names can be "constructor"
|
||||||
negative: SyntaxError
|
|
||||||
---*/
|
---*/
|
||||||
class C {
|
class C {
|
||||||
['constructor']() {}
|
['constructor']() {}
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
es6id: 12.2.5
|
es6id: 12.2.5
|
||||||
description: >
|
description: >
|
||||||
computed property names can be "constructor", but duplicates are not allowed, 2
|
computed property names can be "constructor"
|
||||||
negative: SyntaxError
|
|
||||||
---*/
|
---*/
|
||||||
class C {
|
class C {
|
||||||
['constructor']() {}
|
['constructor']() {}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
|
// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
/*---
|
/*---
|
||||||
es6id: 12.2.5
|
es6id: 14.5.14
|
||||||
description: >
|
description: >
|
||||||
In a class, computed property names for static
|
In a class, computed property names for static
|
||||||
generators cannot be "prototype"
|
generators that are named "prototype" throw a TypeError
|
||||||
negative: SyntaxError
|
|
||||||
---*/
|
---*/
|
||||||
class C {
|
assert.throws(TypeError, function() {
|
||||||
|
class C {
|
||||||
static *['prototype']() {}
|
static *['prototype']() {}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
|
// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
/*---
|
/*---
|
||||||
es6id: 12.2.5
|
es6id: 14.5.14
|
||||||
description: >
|
description: >
|
||||||
In a class, computed property names for static
|
In a class, computed property names for static
|
||||||
getters cannot be "prototype"
|
getters that are named "prototype" throw a TypeError
|
||||||
negative: SyntaxError
|
|
||||||
---*/
|
---*/
|
||||||
class C {
|
assert.throws(TypeError, function() {
|
||||||
|
class C {
|
||||||
static get ['prototype']() {}
|
static get ['prototype']() {}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
|
// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
/*---
|
/*---
|
||||||
es6id: 12.2.5
|
es6id: 14.5.14
|
||||||
description: >
|
description: >
|
||||||
In a class, computed property names for static
|
In a class, computed property names for static
|
||||||
methods cannot be "prototype"
|
methods that are named "prototype" throw a TypeError
|
||||||
negative: SyntaxError
|
|
||||||
---*/
|
---*/
|
||||||
class C {
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
class C {
|
||||||
static ['prototype']() {}
|
static ['prototype']() {}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
|
// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
/*---
|
/*---
|
||||||
es6id: 12.2.5
|
es6id: 14.5.14
|
||||||
description: >
|
description: >
|
||||||
In a class, computed property names for static
|
In a class, computed property names for static
|
||||||
setters cannot be "prototype"
|
setters that are named "prototype" throw a TypeError
|
||||||
negative: SyntaxError
|
|
||||||
---*/
|
---*/
|
||||||
class C {
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
class C {
|
||||||
static set ['prototype'](x) {}
|
static set ['prototype'](x) {}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user