test262/test/language/function-code/S10.4.3_A1.js

16 lines
407 B
JavaScript
Raw Normal View History

2011-09-24 17:25:22 +02:00
// Copyright 2011 Google, Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
2014-07-25 00:41:42 +02:00
es5id: 10.4.3_A1
description: >
When calling a strict anonymous function as a function, "this"
should be bound to undefined.
flags: [onlyStrict]
---*/
2011-09-24 17:25:22 +02:00
var that = (function() { return this; })();
if (that !== undefined) {
$ERROR('#1: "this" leaked as: ' + that);
}