2014-07-22 01:09:02 +02:00
|
|
|
// 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-22 01:09:02 +02:00
|
|
|
|
|
|
|
/*---
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 12.10-0-3
|
2014-07-22 01:09:02 +02:00
|
|
|
description: with introduces scope - that is captured by function expression
|
2015-03-23 17:34:52 +01:00
|
|
|
flags: [noStrict]
|
2014-07-22 01:09:02 +02:00
|
|
|
---*/
|
|
|
|
|
|
|
|
var o = {prop: "12.10-0-3 before"};
|
|
|
|
var f;
|
|
|
|
|
|
|
|
with (o) {
|
|
|
|
f = function () { return prop; }
|
|
|
|
}
|
|
|
|
o.prop = "12.10-0-3 after";
|
2015-08-06 18:33:10 +02:00
|
|
|
|
|
|
|
assert.sameValue(f(), "12.10-0-3 after", 'f()');
|