mirror of https://github.com/tc39/test262.git
Fix cases for ASI
This commit is contained in:
parent
c5a1a4a24b
commit
d4fc8d6fc9
|
@ -1,27 +0,0 @@
|
|||
// 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;
|
|
@ -0,0 +1,42 @@
|
|||
// 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
|
||||
});
|
Loading…
Reference in New Issue