Debian Codegraph @

js/src/tests/test262/language/expressions/delete/11.4.1-5-3.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-delete-operator-runtime-semantics-evaluation
6 description: >
7 delete operator returns false when deleting a direct reference to
8 a function name
9 flags: [noStrict]
10 ---*/
11
12 var foo = function() {};
13
14 // Now, deleting 'foo' directly should fail;
15 var d = delete foo;
16
17 assert.sameValue(d, false, 'd');
18 assert.sameValue(typeof foo, 'function', 'typeof foo');
19
20 reportCompare(0, 0);