summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/function-code/S10.4.3_A1-strict.js
blob: 034e4e018708a9d5f1d47d2f3b97789e6654d2a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict';
// Copyright 2011 Google, Inc.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 10.4.3_A1
description: >
    When calling a strict anonymous function as a  function, "this"
    should be bound to undefined.
flags: [onlyStrict]
---*/

var that = (function() { return this; })();
if (that !== undefined) {
  throw new Test262Error('#1: "this" leaked as: ' + that);
}

reportCompare(0, 0);