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 (#2316)
This commit is contained in:
parent
edafc79523
commit
543cc598de
19
test/language/statements/class/private-non-static-getter-static-setter-early-error.js
Normal file
19
test/language/statements/class/private-non-static-getter-static-setter-early-error.js
Normal file
@ -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) {}
|
||||
}
|
||||
|
19
test/language/statements/class/private-non-static-setter-static-getter-early-error.js
Normal file
19
test/language/statements/class/private-non-static-setter-static-getter-early-error.js
Normal file
@ -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();
|
||||
}
|
||||
|
19
test/language/statements/class/private-static-getter-non-static-setter-early-error.js
Normal file
19
test/language/statements/class/private-static-getter-non-static-setter-early-error.js
Normal file
@ -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) {}
|
||||
}
|
||||
|
19
test/language/statements/class/private-static-setter-non-static-getter-early-error.js
Normal file
19
test/language/statements/class/private-static-setter-non-static-getter-early-error.js
Normal file
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user