blob: 0cdbde4b1c4043e875bc58fc3a81bc081c5a211d [file] [log] [blame] [edit]
// Copyright (C) 2019 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Arrow Function with an AssignmentExpression
template: default
info: |
Statement:
BlockStatement
VariableStatement
EmptyStatement
ExpressionStatement
...
ExpressionStatement:
[lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }]
Expression ;
...
AssignmentExpression:
ConditionalExpression
[+Yield]YieldExpression
ArrowFunction
ArrowFunction:
ArrowParameters [no LineTerminator here] => ConciseBody
ConciseBody:
[lookahead ≠ {] AssignmentExpression
{ FunctionBody }
features: [arrow-function]
---*/
//- StatementListItem
() => 42;
//- EvalAssertions
assert.sameValue(result(), 42);