Sign in
cobalt
/
cobalt
/
c73ce7d5dfce7ae20bcc30efc5f220e0fbac12b1
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
basic
/
testWeirdThingsInFunctionConstructor.js
blob: f262f22020027e410e471bc775391717f640e6e8 [
file
] [
log
] [
blame
]
var
f
=
new
Function
(
'x'
,
'var f = 3; if (x) function f() {}; return f'
);
assertEq
(
f
(
false
),
3
);
assertEq
(
typeof
f
(
true
),
"function"
);
var
f
=
new
Function
(
'x'
,
'"use strict"; x = 3; return arguments[0]'
);
assertEq
(
f
(
42
),
42
);