Skip to content
Snippets Groups Projects
Commit d4fc8d6f authored by Leo Balter's avatar Leo Balter
Browse files

Fix cases for ASI

parent c5a1a4a2
No related branches found
No related tags found
No related merge requests found
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: SyntaxError
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
template: syntax/invalid
features: [class-fields-private]
---*/
//- fields
x = []
y;
// Copyright (C) 2017 the V8 project authors, 2017 Igalia S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Literal property names with ASI
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PropertyName
template: productions
includes: [propertyHelper.js]
---*/
//- fields
a
b = 42;
//- assertions
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
verifyProperty(c, "a", {
value: undefined,
enumerable: true,
writable: true,
configurable: true
});
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
verifyProperty(c, "b", {
value: 42,
enumerable: true,
writable: true,
configurable: true
});
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