Sign in
cobalt
/
cobalt
/
308ed6b84664d59944cd65f4b4359c28a2443be6
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
arrow-functions
/
this-2.js
blob: 3dac3c863dd2492282119e0025e32a1dd892a4f8 [
file
] [
log
] [
blame
]
// 'this' is lexically scoped in direct eval code in arrow functions
var
obj
=
{
f
:
function
(
s
)
{
return
a
=>
eval
(
s
);
}
};
var
g
=
obj
.
f
(
"this"
);
assertEq
(
g
(),
obj
);
var
obj2
=
{
g
:
g
,
fail
:
true
};
assertEq
(
obj2
.
g
(),
obj
);