1
0
mirror of https://github.com/janet-lang/janet synced 2025-02-26 21:00:01 +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); JanetBinding binding = janet_resolve_ext(c->env, sym);
if (binding.type == JANET_BINDING_NONE) { if (binding.type == JANET_BINDING_NONE) {
Janet handler = janet_table_get(c->env, janet_ckeywordv("missing-symbol")); Janet handler = janet_table_get(c->env, janet_ckeywordv("missing-symbol"));
Janet entry;
switch (janet_type(handler)) { switch (janet_type(handler)) {
case JANET_NIL: case JANET_NIL:
break; break;
case JANET_FUNCTION: case JANET_FUNCTION:
Janet entry;
if (!lookup_missing(c, sym, janet_unwrap_function(handler), &entry)) if (!lookup_missing(c, sym, janet_unwrap_function(handler), &entry))
return janetc_cslot(janet_wrap_nil()); return janetc_cslot(janet_wrap_nil());
binding = janet_binding_from_entry(entry); binding = janet_binding_from_entry(entry);