codegen: throw type error when encountering an unknown argument

This commit is contained in:
Gregory Terzian 2019-09-05 00:18:58 +08:00
parent 39bd45529d
commit 5149aefd85
2 changed files with 7 additions and 2 deletions

View file

@ -492,7 +492,7 @@ class CGMethodCall(CGThing):
else:
# Just throw; we have no idea what we're supposed to
# do with this.
caseBody.append(CGGeneric("throw_internal_error(*cx, \"Could not convert JavaScript argument\");\n"
caseBody.append(CGGeneric("throw_type_error(*cx, \"Could not convert JavaScript argument\");\n"
"return false;"))
argCountCases.append(CGCase(str(argCount),