Add more tests for lets with errors

This commit is contained in:
2022-11-02 20:22:32 -04:00
parent 1451970ca8
commit 9c1a81811c
2 changed files with 15 additions and 3 deletions

View File

@@ -163,7 +163,7 @@ struct ucl_object *ucl_builtin_let(struct ucl_state *state, struct ucl_object *a
if (value->type == UCL_TYPE_ERROR) {
// TODO cleanup
assert(0);
return value;
}
ucl_state_put(let_state, sym->symbol, value);
}
@@ -172,8 +172,7 @@ struct ucl_object *ucl_builtin_let(struct ucl_state *state, struct ucl_object *a
FOREACH_LIST(expressions, iter, item) {
result = ucl_evaluate(let_state, item);
if (result->type == UCL_TYPE_ERROR) {
assert(0);
break;
return result;
}
}