summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_5/extensions/regress-bug629723.js
blob: 6c826e0c20b1dd3512e8b772dccbfd2d42a9e0d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function f(foo) {
    "use strict";
    foo.bar;
}

var actual;
try {
    f();
    actual = "no error";
} catch (x) {
    actual = (x instanceof TypeError) ? "type error" : "some other error";
    actual += (/use strict/.test(x)) ? " with directive" : " without directive";
}

reportCompare("type error without directive", actual,
              "decompiled expressions in error messages should not include directive prologues");