Debian Codegraph @

js/src/tests/test262/language/function-code/S10.4.3_A1-strict.js

raw
1 'use strict';
2 // Copyright 2011 Google, Inc. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 es5id: 10.4.3_A1
7 description: >
8 When calling a strict anonymous function as a function, "this"
9 should be bound to undefined.
10 flags: [onlyStrict]
11 ---*/
12
13 var that = (function() { return this; })();
14 if (that !== undefined) {
15 throw new Test262Error('#1: "this" leaked as: ' + that);
16 }
17
18 reportCompare(0, 0);