From 31167da1a950d69e45d77f934d190dc1bfa47ec2 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sun, 15 May 2022 23:50:22 +0100 Subject: [PATCH] avoid `extends` error in test cases (#5443) --- test/ufuzz/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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";