PageRenderTime 12ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/basic/bug620838.js

http://github.com/zpao/v8monkey
JavaScript | 22 lines | 19 code | 3 blank | 0 comment | 1 complexity | 790870c4355eed6883f617b5e95f5f4a MD5 | raw file
 1function g() {
 2    return "global";
 3}
 4
 5function q(fun) {
 6    return fun();
 7}
 8
 9function f(x) {
10    if (x) {
11        function g() {
12            return "local";
13        }
14        var ans = q(function() {
15            return g();
16        });
17    }
18    g = null;
19    return ans;
20}
21
22assertEq(f(true), "local");