1
0
mirror of https://github.com/tc39/test262.git synced 2025-04-08 19:35:28 +02:00

Adding tests to verify early error when mixing private static and instance accessors ()

This commit is contained in:
Caio Lima 2019-09-20 15:27:03 -03:00 committed by Leo Balter
parent edafc79523
commit 543cc598de
4 changed files with 76 additions and 0 deletions

@ -0,0 +1,19 @@
// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
It is a Syntax Error if we declare a private instance getter and private static setter
features: [class-static-methods-private, class-methods-private]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
class C {
get #f();
static set #f(v) {}
}

@ -0,0 +1,19 @@
// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
It is a Syntax Error if we declare a private instance setter and a static private getter
features: [class-static-methods-private, class-methods-private]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
class C {
set #f(v) {}
static get #f();
}

@ -0,0 +1,19 @@
// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
It is a Syntax Error if we declare a private static getter and a private instance setter
features: [class-static-methods-private, class-methods-private]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
class C {
static get #f();
set #f(v) {}
}

@ -0,0 +1,19 @@
// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
It is a Syntax Error if we declare a static private setter and a private instance getter
features: [class-static-methods-private, class-methods-private]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
class C {
static set #f(v) {}
get #f();
}