diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index 75de87d5..37dce302 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -1805,7 +1805,7 @@ function createClassLiteral(recurmax, stmtDepth, canThrow, name) { if (canThrow && rng(20) == 0) { s += p; } else { - s += "(" + p + " && " + p + ".constructor === Function ? " + p + " : function() {})"; + s += "(typeof " + p + ' == "function" && typeof ' + p + '.prototype == "object" ? ' + p + " : function() {})"; } } s += " {\n";