cptn-decl.js (523B)
1 // Copyright (C) 2017 Apple Inc. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-function-definitions-runtime-semantics-evaluation 5 description: Function declaration completion value is empty. 6 info: | 7 FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody } 8 9 1. Return NormalCompletion(empty). 10 ---*/ 11 12 assert.sameValue(eval('function f() {}'), undefined); 13 assert.sameValue(eval('1; function f() {}'), 1); 14 15 reportCompare(0, 0);