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