summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/arrow-function/dflt-params-abrupt.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /js/src/tests/test262/language/expressions/arrow-function/dflt-params-abrupt.js
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/language/expressions/arrow-function/dflt-params-abrupt.js')
-rw-r--r--js/src/tests/test262/language/expressions/arrow-function/dflt-params-abrupt.js63
1 files changed, 63 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/arrow-function/dflt-params-abrupt.js b/js/src/tests/test262/language/expressions/arrow-function/dflt-params-abrupt.js
new file mode 100644
index 0000000000..ea8633d42b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/arrow-function/dflt-params-abrupt.js
@@ -0,0 +1,63 @@
+// This file was procedurally generated from the following sources:
+// - src/function-forms/dflt-params-abrupt.case
+// - src/function-forms/error/arrow-function.template
+/*---
+description: Abrupt completion returned by evaluation of initializer (arrow function expression)
+esid: sec-arrow-function-definitions-runtime-semantics-evaluation
+features: [default-parameters]
+flags: [generated]
+info: |
+ ArrowFunction : ArrowParameters => ConciseBody
+
+ [...]
+ 4. Let closure be FunctionCreate(Arrow, parameters, ConciseBody, scope, strict).
+ [...]
+
+ 9.2.1 [[Call]] ( thisArgument, argumentsList)
+
+ [...]
+ 7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
+ [...]
+
+ 9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
+
+ 1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
+ [...]
+
+ 9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
+
+ [...]
+ 23. Let iteratorRecord be Record {[[iterator]]:
+ CreateListIterator(argumentsList), [[done]]: false}.
+ 24. If hasDuplicates is true, then
+ [...]
+ 25. Else,
+ b. Let formalStatus be IteratorBindingInitialization for formals with
+ iteratorRecord and env as arguments.
+ [...]
+
+ 14.1.19 Runtime Semantics: IteratorBindingInitialization
+
+ FormalsList : FormalsList , FormalParameter
+
+ 1. Let status be the result of performing IteratorBindingInitialization for
+ FormalsList using iteratorRecord and environment as the arguments.
+ 2. ReturnIfAbrupt(status).
+ 3. Return the result of performing IteratorBindingInitialization for
+ FormalParameter using iteratorRecord and environment as the arguments.
+
+---*/
+
+var callCount = 0;
+var f;
+f = (_ = (function() { throw new Test262Error(); }())) => {
+
+ callCount = callCount + 1;
+};
+
+assert.throws(Test262Error, function() {
+ f();
+});
+assert.sameValue(callCount, 0, 'arrow function body not evaluated');
+
+reportCompare(0, 0);