test for scoping issue

This commit is contained in:
Julian Dolby 2014-06-26 11:00:18 -04:00
parent 87c42b61d6
commit dbda8aab9e
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
var f = {
m: function bad(x) { return x; }
};
g = {
n: function global_bad(x) { return x; }
};
function test(y) {
var f = f ? f : { };
var g = g ? g : { };
return f.m(y) + " " + g.n(y);
}
test(3);