Skip to content
Snippets Groups Projects
Commit dc4db968 authored by Daniel Ehrenberg's avatar Daniel Ehrenberg Committed by Rick Waldron
Browse files

Add tests that public and private static fields are unsupported

parent 2e042d9f
No related branches found
No related tags found
No related merge requests found
// 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; }");
// 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; }");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment