test262/test/language/statements/with/12.10-0-3.js

22 lines
501 B
JavaScript
Raw Normal View History

// Copyright (c) 2012 Ecma International. All rights reserved.
2015-07-17 17:42:45 +02:00
// This code is governed by the BSD license found in the LICENSE file.
/*---
2014-07-25 00:41:42 +02:00
es5id: 12.10-0-3
description: with introduces scope - that is captured by function expression
includes: [runTestCase.js]
flags: [noStrict]
---*/
function testcase() {
var o = {prop: "12.10-0-3 before"};
var f;
with (o) {
f = function () { return prop; }
}
o.prop = "12.10-0-3 after";
return f()==="12.10-0-3 after"
}
runTestCase(testcase);