mirror of https://github.com/tc39/test262.git
Add coverage for reserved words in shorthand properties. Fixes gh-1179
This commit is contained in:
parent
ab4a019a4d
commit
057a31e15e
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (implements)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var implements = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
implements
|
||||
});
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (interface)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var interface = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
interface
|
||||
});
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (let)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var let = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
let
|
||||
});
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (package)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var package = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
package
|
||||
});
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (private)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var private = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
private
|
||||
});
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (protected)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var protected = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
protected
|
||||
});
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (public)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var public = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
public
|
||||
});
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (static)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var static = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
static
|
||||
});
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Object literal shorthands are limited to valid identifier references. Future Reserved Words are disallowed in Strict Mode. (yield)
|
||||
esid: sec-object-initializer
|
||||
flags: [noStrict]
|
||||
info: |
|
||||
PropertyDefinition:
|
||||
IdentifierReference
|
||||
CoverInitializedName
|
||||
PropertyName : AssignmentExpression
|
||||
MethodDefinition
|
||||
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and
|
||||
the StringValue of IdentifierName is: "implements", "interface", "let",
|
||||
"package", "private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var yield = 1;
|
||||
(function() {
|
||||
"use strict";
|
||||
({
|
||||
yield
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue