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

Merge pull request #910 from pyrmont/bugfix.redefinable-macros

Fix redefinable macros
This commit is contained in:
Calvin Rose 2022-01-14 07:45:54 -06:00 committed by GitHub
commit f2f421a0a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -657,7 +657,7 @@ static int macroexpand1(
}
Janet 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))
return 0;