js/src/jit-test/tests/basic/bug790629-3.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/bug790629-3.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,11 @@
     1.4 +// 'this' in escaping generator-expression in a method
     1.5 +// is the same as 'this' in the enclosing method
     1.6 +// even if the method does not otherwise use 'this'.
     1.7 +
     1.8 +var obj = {
     1.9 +    f: function () {
    1.10 +        return (this for (x of [0]));
    1.11 +    }
    1.12 +};
    1.13 +
    1.14 +assertEq(obj.f().next(), obj);

mercurial