Skip to content

Commit

Permalink
env: "Regression"-assertion to make sure we don't add a scope that's …
Browse files Browse the repository at this point in the history
…already on the scope stack
  • Loading branch information
obiwac committed Dec 20, 2024
1 parent abf9dd5 commit b8f0dd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flamingo/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ static flamingo_scope_t* env_cur_scope(flamingo_env_t* env) {
}

static void env_gently_attach_scope(flamingo_env_t* env, flamingo_scope_t* scope) {
assert(env->scope_stack_size == 0 || env->scope_stack[env->scope_stack_size - 1] != scope);

env->scope_stack = realloc(env->scope_stack, ++env->scope_stack_size * sizeof *env->scope_stack);
assert(env->scope_stack != NULL);

Expand Down

0 comments on commit b8f0dd7

Please sign in to comment.