mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 23:14:47 +02:00
Adding test to cover case where there is a static field named as 'static'
This commit is contained in:
parent
d279980b96
commit
740e157eb0
24
src/class-elements/static-as-valid-static-field.case
Normal file
24
src/class-elements/static-as-valid-static-field.case
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (C) 2020 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: static is a valid name of a static field
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
static FieldDefinition ;
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
features: [class-static-fields-public]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- elements
|
||||||
|
static static;
|
||||||
|
//- assertions
|
||||||
|
verifyProperty(C, "static", {
|
||||||
|
value: undefined,
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/class-elements/static-as-valid-static-field.case
|
||||||
|
// - src/class-elements/default/cls-expr.template
|
||||||
|
/*---
|
||||||
|
description: static is a valid name of a static field (field definitions in a class expression)
|
||||||
|
esid: prod-FieldDefinition
|
||||||
|
features: [class-static-fields-public, class]
|
||||||
|
flags: [generated]
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
static FieldDefinition ;
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static static;
|
||||||
|
}
|
||||||
|
|
||||||
|
verifyProperty(C, "static", {
|
||||||
|
value: undefined,
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/class-elements/static-as-valid-static-field.case
|
||||||
|
// - src/class-elements/default/cls-decl.template
|
||||||
|
/*---
|
||||||
|
description: static is a valid name of a static field (field definitions in a class declaration)
|
||||||
|
esid: prod-FieldDefinition
|
||||||
|
features: [class-static-fields-public, class]
|
||||||
|
flags: [generated]
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
static FieldDefinition ;
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static static;
|
||||||
|
}
|
||||||
|
|
||||||
|
verifyProperty(C, "static", {
|
||||||
|
value: undefined,
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user