mirror of https://github.com/tc39/test262.git
Add tests that public and private static fields are unsupported
This commit is contained in:
parent
2e042d9f9d
commit
dc4db968f2
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2017 Igalia, S. L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Static private fields are not supported
|
||||
features: [class, class-fields-private]
|
||||
---*/
|
||||
|
||||
assert.throws.early(SyntaxError, "class C { static #field; }");
|
||||
assert.throws.early(SyntaxError, "class C { static #field = 0; }");
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2017 Igalia, S. L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Static public fields are not supported
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
assert.throws.early(SyntaxError, "class C { static field; }");
|
||||
assert.throws.early(SyntaxError, "class C { static field = 0; }");
|
||||
assert.throws.early(SyntaxError, "class C { static ['field']; }");
|
||||
assert.throws.early(SyntaxError, "class C { static ['field'] = 0; }");
|
Loading…
Reference in New Issue