blob: c08203ae26ef6a2e2af51d7b2e74e1254fbc9b23 [file] [log] [blame]
//@ runDefault
function test() {
try {
[1,2].sort(null);
return false;
} catch (enull) {}
try {
[1,2].sort(true);
return false;
} catch (etrue) {}
try {
[1,2].sort({});
return false;
} catch (eobj) {}
try {
[1,2].sort([]);
return false;
} catch (earr) {}
try {
[1,2].sort(/a/g);
return false;
} catch (eregex) {}
return true;
}
if(!test())
throw new Error("Bad result");