From 27287519aaba8ce79cd592aeddaf60b544d22adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 24 Nov 2023 23:40:48 +0100 Subject: [PATCH] Fix implicit enum conversion Ref: https://github.com/quickjs-ng/quickjs/issues/131 --- quickjs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickjs.c b/quickjs.c index 261b4f9..fbe809c 100644 --- a/quickjs.c +++ b/quickjs.c @@ -26363,7 +26363,7 @@ static int add_import(JSParseState *s, JSModuleDef *m, is_local = (import_name == JS_ATOM__star_); var_idx = add_closure_var(ctx, s->cur_func, is_local, FALSE, m->import_entries_count, - local_name, TRUE, TRUE, FALSE); + local_name, TRUE, TRUE, JS_VAR_NORMAL); if (var_idx < 0) return -1; if (js_resize_array(ctx, (void **)&m->import_entries, @@ -30162,7 +30162,7 @@ static int add_module_variables(JSContext *ctx, JSFunctionDef *fd) for(i = 0; i < fd->global_var_count; i++) { hf = &fd->global_vars[i]; if (add_closure_var(ctx, fd, TRUE, FALSE, i, hf->var_name, hf->is_const, - hf->is_lexical, FALSE) < 0) + hf->is_lexical, JS_VAR_NORMAL) < 0) return -1; }