blob: 96ee41b25cec19e00896ca78c9ab2435956e9063 [file] [edit]
// Copyright (C) 2020 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/function/named-no-strict-
name: named function expression in non-strict mode code
esid: sec-function-definitions-runtime-semantics-evaluation
info: |
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
flags: [noStrict]
---*/
// increment callCount in case "body"
let callCount = 0;
let ref = function BindingIdentifier() {
/*{ body }*/
};
assert.sameValue(ref(), ref);
assert.sameValue(callCount, 1, 'function invoked exactly once');