avoid extends error in ufuzz

This commit is contained in:
alexlamsl 2022-05-16 11:08:31 +08:00
parent fc6a66836a
commit c698b1afe9

View File

@ -1805,7 +1805,7 @@ function createClassLiteral(recurmax, stmtDepth, canThrow, name) {
if (canThrow && rng(20) == 0) {
s += p;
} else {
s += "(typeof " + p + ' == "function" && typeof ' + p + '.prototype == "object" ? ' + p + " : function() {})";
s += "(typeof " + p + ' == "function" && typeof ' + p + '.prototype == "object" && ' + p + ".constructor === Function ? " + p + " : function() {})";
}
}
s += " {\n";