1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

Fix declaration error in switch statement

This commit is contained in:
Michael Camilleri 2022-01-24 11:16:19 +09:00
parent fad0ce3ced
commit ee924ee310
No known key found for this signature in database
GPG Key ID: 7EB218A48DF8B572

View File

@ -265,11 +265,11 @@ JanetSlot janetc_resolve(
JanetBinding binding = janet_resolve_ext(c->env, sym);
if (binding.type == JANET_BINDING_NONE) {
Janet handler = janet_table_get(c->env, janet_ckeywordv("missing-symbol"));
Janet entry;
switch (janet_type(handler)) {
case JANET_NIL:
break;
case JANET_FUNCTION:
Janet entry;
if (!lookup_missing(c, sym, janet_unwrap_function(handler), &entry))
return janetc_cslot(janet_wrap_nil());
binding = janet_binding_from_entry(entry);