summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/class/elements/fields-duplicate-privatenames.js
blob: da13cf7b432c51e9d38514890c72455305a5a676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// |reftest| error:SyntaxError
// Copyright 2017 Valerie Young.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: Syntax error if the same private field defined twice
esid: sec-class-definitions-static-semantics-early-errors
features: [class, class-fields-private]
negative:
  phase: parse
  type: SyntaxError
info: |
  Static Semantics: Early Errors

    ClassBody : ClassElementList
    It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries.
---*/


$DONOTEVALUATE();

class C {
  #x;
  #x;
}