diff --git a/src/dict.c b/src/dict.c index 7ad254ec..ddbe2cb5 100644 --- a/src/dict.c +++ b/src/dict.c @@ -67,6 +67,10 @@ pic_dict_dict_del(pic_state *pic) pic_get_args(pic, "dm", &dict, &key); + if (xh_get_int(&dict->hash, key) == NULL) { + pic_errorf(pic, "no slot named ~s found in dictionary", pic_sym_value(key)); + } + xh_del_int(&dict->hash, key); return pic_none_value();