1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-27 00:40:26 +00:00

Fix redefinable macros

This commit is contained in:
Michael Camilleri 2022-01-14 17:15:42 +09:00
parent 3b412d51f0
commit 413c46e2ee
No known key found for this signature in database
GPG Key ID: 7EB218A48DF8B572

View File

@ -657,7 +657,7 @@ static int macroexpand1(
} }
Janet macroval; Janet macroval;
JanetBindingType btype = janet_resolve(c->env, name, &macroval); JanetBindingType btype = janet_resolve(c->env, name, &macroval);
if (btype != JANET_BINDING_MACRO || if (!(btype == JANET_BINDING_MACRO || btype == JANET_BINDING_DYNAMIC_MACRO) ||
!janet_checktype(macroval, JANET_FUNCTION)) !janet_checktype(macroval, JANET_FUNCTION))
return 0; return 0;