Exporting undeclared variables should throw a SyntaxError (#4276)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
This commit is contained in:
Dániel Bátyai
2020-10-15 14:48:25 +02:00
committed by GitHub
parent f6cf1400bd
commit 650269feca
9 changed files with 62 additions and 4 deletions
+4
View File
@@ -1418,6 +1418,10 @@ parser_error_to_string (parser_error_t error) /**< error code */
{
return "Duplicated imported binding name.";
}
case PARSER_ERR_EXPORT_NOT_DEFINED:
{
return "Export not defined in module.";
}
#endif /* ENABLED (JERRY_MODULE_SYSTEM) */
default: