Skip to content

Commit a8f35f1

Browse files
committed
Add tests for ecma262#3568
1 parent 7c4a799 commit a8f35f1

28 files changed

Lines changed: 634 additions & 80 deletions

src/assignment-target-type/callexpression-arguments.case

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (C) 2025 Sony Interactive Entertainment Inc. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
4+
/*---
5+
esid: sec-static-semantics-static-semantics-assignmenttargettype
6+
desc: >
7+
Static Semantics AssignmentTargetType, Return web-compat.
8+
info: |
9+
CallExpression :
10+
CoverCallExpressionAndAsyncArrowHead
11+
CallExpression Arguments
12+
1. If the host is a web browser or otherwise supports Late Errors for Function Call Assignment Targets, then
13+
a. If IsStrict(this CallExpression) is false, return ~web-compat~.
14+
2. Return ~invalid~.
15+
template: invalid/statement
16+
negative:
17+
phase: parse
18+
type: SyntaxError
19+
flags: [onlyStrict]
20+
---*/
21+
22+
//- statement
23+
for (f() in [1]) {}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (C) 2025 Sony Interactive Entertainment Inc. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
4+
/*---
5+
esid: sec-static-semantics-static-semantics-assignmenttargettype
6+
desc: >
7+
Static Semantics AssignmentTargetType, Return web-compat.
8+
info: |
9+
CallExpression :
10+
CoverCallExpressionAndAsyncArrowHead
11+
CallExpression Arguments
12+
1. If the host is a web browser or otherwise supports Late Errors for Function Call Assignment Targets, then
13+
a. If IsStrict(this CallExpression) is false, return ~web-compat~.
14+
2. Return ~invalid~.
15+
template: invalid/statement
16+
negative:
17+
phase: parse
18+
type: SyntaxError
19+
flags: [onlyStrict]
20+
---*/
21+
22+
//- statement
23+
for (f() of [1]) {}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (C) 2025 Sony Interactive Entertainment Inc. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
4+
/*---
5+
esid: sec-static-semantics-static-semantics-assignmenttargettype
6+
desc: >
7+
Static Semantics AssignmentTargetType, Return web-compat.
8+
info: |
9+
CallExpression :
10+
CoverCallExpressionAndAsyncArrowHead
11+
CallExpression Arguments
12+
1. If the host is a web browser or otherwise supports Late Errors for Function Call Assignment Targets, then
13+
a. If IsStrict(this CallExpression) is false, return ~web-compat~.
14+
2. Return ~invalid~.
15+
template: invalid
16+
negative:
17+
phase: parse
18+
type: SyntaxError
19+
flags: [onlyStrict]
20+
---*/
21+
22+
//- assignmenttarget
23+
f()
24+
//- operator
25+
+=
26+
//- value
27+
1
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (C) 2025 Sony Interactive Entertainment Inc. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
4+
/*---
5+
esid: sec-static-semantics-static-semantics-assignmenttargettype
6+
desc: >
7+
Static Semantics AssignmentTargetType, Return web-compat.
8+
info: |
9+
CallExpression :
10+
CoverCallExpressionAndAsyncArrowHead
11+
CallExpression Arguments
12+
1. If the host is a web browser or otherwise supports Late Errors for Function Call Assignment Targets, then
13+
a. If IsStrict(this CallExpression) is false, return ~web-compat~.
14+
2. Return ~invalid~.
15+
template: invalid
16+
negative:
17+
phase: parse
18+
type: SyntaxError
19+
---*/
20+
21+
//- assignmenttarget
22+
f()
23+
//- operator
24+
&&=
25+
//- value
26+
1
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (C) 2025 Sony Interactive Entertainment Inc. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
4+
/*---
5+
esid: sec-static-semantics-static-semantics-assignmenttargettype
6+
desc: >
7+
Static Semantics AssignmentTargetType, Return web-compat.
8+
info: |
9+
CallExpression :
10+
CoverCallExpressionAndAsyncArrowHead
11+
CallExpression Arguments
12+
1. If the host is a web browser or otherwise supports Late Errors for Function Call Assignment Targets, then
13+
a. If IsStrict(this CallExpression) is false, return ~web-compat~.
14+
2. Return ~invalid~.
15+
template: invalid/statement
16+
negative:
17+
phase: parse
18+
type: SyntaxError
19+
flags: [onlyStrict]
20+
---*/
21+
22+
//- statement
23+
f()++;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (C) 2025 Sony Interactive Entertainment Inc. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
4+
/*---
5+
esid: sec-static-semantics-static-semantics-assignmenttargettype
6+
desc: >
7+
Static Semantics AssignmentTargetType, Return web-compat.
8+
info: |
9+
CallExpression :
10+
CoverCallExpressionAndAsyncArrowHead
11+
CallExpression Arguments
12+
1. If the host is a web browser or otherwise supports Late Errors for Function Call Assignment Targets, then
13+
a. If IsStrict(this CallExpression) is false, return ~web-compat~.
14+
2. Return ~invalid~.
15+
template: invalid/statement
16+
negative:
17+
phase: parse
18+
type: SyntaxError
19+
flags: [onlyStrict]
20+
---*/
21+
22+
//- statement
23+
++f();
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright (C) 2020 Rick Waldron. All rights reserved.
2+
// Copyright (C) 2025 Sony Interactive Entertainment Inc. All rights reserved.
3+
// This code is governed by the BSD license found in the LICENSE file.
4+
5+
/*---
6+
esid: sec-static-semantics-static-semantics-assignmenttargettype
7+
desc: >
8+
Static Semantics AssignmentTargetType, Return web-compat.
9+
info: |
10+
CallExpression :
11+
CoverCallExpressionAndAsyncArrowHead
12+
CallExpression Arguments
13+
1. If the host is a web browser or otherwise supports Late Errors for Function Call Assignment Targets, then
14+
a. If IsStrict(this CallExpression) is false, return ~web-compat~.
15+
2. Return ~invalid~.
16+
template: invalid
17+
negative:
18+
phase: parse
19+
type: SyntaxError
20+
flags: [onlyStrict]
21+
---*/
22+
23+
//- assignmenttarget
24+
f()
25+
//- operator
26+
=
27+
//- value
28+
1

src/assignment-target-type/invalid/iteration/direct.template

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (C) 2025 Sony Interactive Entertainment Inc. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
4+
/*---
5+
path: language/expressions/assignmenttargettype/direct-
6+
name: Direct assignment
7+
info: |
8+
Direct assignment
9+
---*/
10+
$DONOTEVALUATE();
11+
12+
/*{ statement }*/

0 commit comments

Comments
 (0)