blob: 2dc51508d4ff6c191d516c5631108c51b5bd5503 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
x = Proxy.create((function () {
return {
get: function () {}
}
}()), Object.e)
var hit = false;
try {
Function("\
for(var a = 0; a < 2; ++a) {\
if (a == 0) {}\
else {\
x > x\
}\
}\
")()
} catch (e) {
hit = true;
var str = String(e);
var match = (str == "TypeError: x is not a function" ||
str == "TypeError: can't convert x to number");
assertEq(match, true);
}
assertEq(hit, true);
|