avoid extends error in test cases (#5443)

This commit is contained in:
Alex Lam S.L
2022-05-15 23:50:22 +01:00
committed by GitHub
parent 7db2ada880
commit 31167da1a9

View File

@@ -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";