Skip to content

Commit

Permalink
Fix: Unhandled error: Error: Cannot reassign to constant a. in `tes…
Browse files Browse the repository at this point in the history
…ts/all.flv`

#190
  • Loading branch information
KennyOliver committed Jan 9, 2025
1 parent d75423a commit d875ac6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/interpreter/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ InterpretResult add_variable(Environment *env, Variable var) {
if (env->variables[i].is_constant) {
debug_print_int("Attempted to reassign to constant `%s`\n",
var.variable_name);
return raise_error("Error: Cannot reassign to constant `%s`.\n",
return raise_error("Cannot reassign to constant `%s`.\n",
var.variable_name);
}

Expand Down
4 changes: 2 additions & 2 deletions src/tests/all.flv
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ create test(num, func_a, func_b) {
deliver func_b(func_a(func_b(num)));
}

let a = test(10, times_2, times_3); # 180
serve(a);
let calc17_result = test(10, times_2, times_3); # 180
serve(calc17_result);

# ==================================================
# 18
Expand Down

0 comments on commit d875ac6

Please sign in to comment.